PHPackages                             wyrihaximus/psr-3-callable-throwable-logger - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wyrihaximus/psr-3-callable-throwable-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

wyrihaximus/psr-3-callable-throwable-logger
===========================================

callable throwable decorator around a PSR-3 logger (to be used with react/promise and reactivex/rxphp)

2.4.0(1y ago)282.0k↑410%[1 issues](https://github.com/WyriHaximus/php-psr-3-callable-throwable-logger/issues)[4 PRs](https://github.com/WyriHaximus/php-psr-3-callable-throwable-logger/pulls)1MITMakefilePHP ^8.3CI passing

Since May 7Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/php-psr-3-callable-throwable-logger)[ Packagist](https://packagist.org/packages/wyrihaximus/psr-3-callable-throwable-logger)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-psr-3-callable-throwable-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (12)Used By (1)

Callable throwable decorator around a [PSR-3](http://www.php-fig.org/psr/psr-3/) logger (to be used with [`react/promise`](https://reactphp.org/promise/) and [`reactivex/rxphp`](https://github.com/ReactiveX/RxPHP))
======================================================================================================================================================================================================================

[](#callable-throwable-decorator-around-a-psr-3-logger-to-be-used-with-reactpromise-and-reactivexrxphp)

[![Continuous Integration](https://github.com/WyriHaximus/php-psr-3-callable-throwable-logger/actions/workflows/ci.yml/badge.svg)](https://github.com/WyriHaximus/php-psr-3-callable-throwable-logger/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/f78fa2579282317a80afc9dfd066c8fc23945d4839219e95afc3689d0cec5b11/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7073722d332d63616c6c61626c652d7468726f7761626c652d6c6f676765722f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/psr-3-callable-throwable-logger)[![Total Downloads](https://camo.githubusercontent.com/3cbdc0234e594e01af036652b9173aca46d2aa742c30159dd4c3279a9d74e197/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7073722d332d63616c6c61626c652d7468726f7761626c652d6c6f676765722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/psr-3-callable-throwable-logger/stats)[![Code Coverage](https://camo.githubusercontent.com/b37d58a730ed4f3d175ab6ef3e93bdfddbeb0b2168f206ad88939b15c80b04fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57797269486178696d75732f7068702d7073722d332d63616c6c61626c652d7468726f7761626c652d6c6f676765722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WyriHaximus/php-psr-3-callable-throwable-logger/?branch=master)[![License](https://camo.githubusercontent.com/dc3bddcd9f242be3bfd4fbbeb7485f7c08d21ef4b818daba6009620bbbdacfdb/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7073722d332d63616c6c61626c652d7468726f7761626c652d6c6f676765722f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/psr-3-callable-throwable-logger)

### Installation

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/psr-3-callable-throwable-logger

```

Usage with [`react/promise`](https://reactphp.org/promise/)
-----------------------------------------------------------

[](#usage-with-reactpromise)

Whenever a promise rejects the closure from `CallableThrowableLogger::create` will be invoked and an `error` message will be logged to `$logger`

```
$logger = new Psr3Logger();
$reactPromise->then(function () {
    // Happy flow handler
}, CallableThrowableLogger::create($logger));
```

Usage with [`reactivex/rxphp`](https://github.com/ReactiveX/RxPHP)
------------------------------------------------------------------

[](#usage-with-reactivexrxphp)

Whenever an errors comes from the stream the closure from `CallableThrowableLogger::create` will be invoked and and `error` message will be logged to `$logger`.

```
$logger = new Psr3Logger();
$rxPhpStream->subscribute(function ($item) {
    // Items handler
}, CallableThrowableLogger::create($logger), function () {
    // Done
});
```

Optional arguments
------------------

[](#optional-arguments)

```
CallableThrowableLogger::create(
    $logger, // required: PSR-3 logger
    'error', // optional: Message level
    'Uncaught Throwable %1$s: "%2$s" at %3$s line %4$s', // optional: Message
    // %1$s => the throwable classname
    // %2$s => the throwable message
    // %3$s => the throwable file
    // %4$s => the throwable line
);
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

Copyright 2025 [Cees-Jan Kiewiet](http://wyrihaximus.net/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance60

Regular maintenance activity

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 62.6% 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 ~428 days

Recently: every ~470 days

Total

7

Last Release

365d ago

Major Versions

1.0.0 → 2.0.02019-09-17

PHP version history (5 changes)1.0.0PHP ^7.0

2.0.0PHP ^7.3

2.1.0PHP ^7.4

2.2.0PHP ^8 || ^7.4.7

2.4.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (62 commits)")[![renovate-runner[bot]](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/renovate-runner[bot] "renovate-runner[bot] (14 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (9 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

closurehacktoberfestloggerphpphp7psr-3reactphprxphpthrowable

### Embed Badge

![Health badge](/badges/wyrihaximus-psr-3-callable-throwable-logger/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-psr-3-callable-throwable-logger/health.svg)](https://phpackages.com/packages/wyrihaximus-psr-3-callable-throwable-logger)
```

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[open-telemetry/api

API for OpenTelemetry PHP.

1933.0M214](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2322.9M248](/packages/open-telemetry-sdk)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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