PHPackages                             raigu/psr3-log-spy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. raigu/psr3-log-spy

ActiveLibrary[Testing &amp; Quality](/categories/testing)

raigu/psr3-log-spy
==================

Spy of PSR-3 LoggerInterface for testing

v0.1.1(4y ago)14MITPHPPHP &gt;=7.4||^8.0

Since Aug 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/raigu/psr3-log-spy)[ Packagist](https://packagist.org/packages/raigu/psr3-log-spy)[ RSS](/packages/raigu-psr3-log-spy/feed)WikiDiscussions main Synced 4d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/27e3bf63097caf5923c31d384264f888a0905b3188d9baf700e72fa4a00d3d70/687474703a2f2f706f7365722e707567782e6f72672f72616967752f707372332d6c6f672d7370792f762f737461626c65)](https://packagist.org/packages/raigu/psr3-log-spy)[![Fallows SemVer](https://camo.githubusercontent.com/0ba7a49bc642a7fa1e7c2b21f034148f17652edb537d5aed7f0dfbe3259f8cc4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53656d5665722d322e302e302d677265656e)](https://semver.org/spec/v2.0.0.html)[![build](https://github.com/raigu/psr3-log-spy/workflows/build/badge.svg)](https://github.com/raigu/psr3-log-spy/actions)[![codecov](https://camo.githubusercontent.com/c26b12648c223a8ebb4564e2740f489cfb400d079d3aacb7a6091f56841984c3/68747470733a2f2f636f6465636f762e696f2f67682f72616967752f707372332d6c6f672d7370792f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d394444303434544e3732)](https://codecov.io/gh/raigu/psr3-log-spy)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

psr3-log-spy
============

[](#psr3-log-spy)

An implementation of PSR-3 LoggerInterface for spying on a subject under test (SUT) to verify that the SUT is using the given logger.

Compatibility
=============

[](#compatibility)

- PHP 7.4, ^8.0
- psr/log ^1.1||2.0.0

Changes
=======

[](#changes)

[./CHANGELOG.md](./CHANGELOG.md)

Install
=======

[](#install)

```
$ composer require --dev raigu/psr3-log-spy
```

Usage
=====

[](#usage)

```
$spy = new \Raigu\TestDouble\Psr3\LoggerSpy();

$sut = new Foo($spy);
$sut->bar();

assert($spy->any());
```

Methods
=======

[](#methods)

MethodDescriptionanyat least one message was loggedanyEmergencyat least one emergency message was loggedanyAlertat least one alert message was loggedanyCriticalat least one critical message was loggedanyErrorat least one error message was loggedanyWarningat least one warning message was loggedanyNoticeat least one notice message was loggedanyInfoat least one info message was loggedanyDebugat least on debug message was loggedTesting
=======

[](#testing)

```
$ composer test
$ composer specification
$ composer coverage
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1718d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82bf3ac844b3984ae4f9965188829da1729ca1e86abd92151406d15896c021b9?d=identicon)[raigu](/maintainers/raigu)

---

Top Contributors

[![raigu](https://avatars.githubusercontent.com/u/3442567?v=4)](https://github.com/raigu "raigu (27 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/raigu-psr3-log-spy/health.svg)

```
[![Health](https://phpackages.com/badges/raigu-psr3-log-spy/health.svg)](https://phpackages.com/packages/raigu-psr3-log-spy)
```

###  Alternatives

[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[growthbook/growthbook

PHP SDK for GrowthBook, the feature flagging and A/B testing platform

202.9M3](/packages/growthbook-growthbook)[playwright-php/playwright

Modern PHP library for Playwright automation: browsing, scraping, screenshots, testing, and more.

7613.0k5](/packages/playwright-php-playwright)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
