mimmi20/monolog-callbackfilterhandler
Monolog handler wrapper that filters records based on a list of callback functions
Maintainers
Package info
github.com/mimmi20/monolog-callbackfilterhandler
pkg:composer/mimmi20/monolog-callbackfilterhandler
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0
- ext-json: *
- monolog/monolog: ^3.10.0
Requires (Dev)
- ext-ctype: *
- ext-dom: *
- ext-mbstring: *
- ext-simplexml: *
- ext-tokenizer: *
- ext-xml: *
- ext-xmlwriter: *
- ergebnis/composer-normalize: ^2.51.0
- infection/infection: ^0.32.7
- jbelien/phpstan-sarif-formatter: ^1.2.0
- mimmi20/coding-standard: ^6.2.5
- nikic/php-parser: ^5.7.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1.54
- phpstan/phpstan-deprecation-rules: ^2.0.4
- phpunit/phpunit: ^12.5.3
- psr/log: ^3.0.2
- rector/rector: ^2.4.3
- rector/type-perfect: ^2.1.4
- shipmonk/composer-dependency-analyser: ^1.8.4
- symfony/process: ^7.3.4
- symplify/phpstan-rules: ^14.9.11
- tomasvotruba/cognitive-complexity: ^1.1.0
- tomasvotruba/type-coverage: ^2.1.0
- tomasvotruba/unused-public: ^2.2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
BSD-3-Clause 78711c3610806280ef95f8b03cdfe2446df93819
README
This library is a Fork of llaville/monolog-callbackfilterhandler with updates for Monolog 3.
π Latest Stable Version
π Latest Unstable Version
π License
Code Status
π codecov
π Test Coverage
π Average time to resolve an issue
π Percentage of issues still open
π Mutation testing badge
π Maintainability
Requirements
This handler works with PHP 8.1 or above
Installation
Run
composer require mimmi20/monolog-callbackfilterhandler
Features
- This handler obey first to basic Monolog rules as
handler levelandbubble. - Then, in second time, logs are filtered by rules defined in one or more callback functions.
Main difference with FilterHandler included in standard Monolog distribution since version 1.8.0
FilterHandlercan just filter records and only allow those of a given list of levels through to the wrapped handler.CallbackFilterHandlermay filter records to the wrapped handler, on each standard record elements including extra data and logging context.
Example
Here is a basic setup to log all events to a file and most important to another one (or notify by mail). See examples/basic.php file.
License
This package is licensed using the MIT License.
Please have a look at LICENSE.md.
