devlop / prefixed-logger
PSR-3 wrapper to prefix all messages going into a logger
1.0.1
2021-03-05 08:15 UTC
Requires
- php: ^7.4|^8.0
- psr/log: ^1.0.1
Requires (Dev)
- monolog/monolog: ^2.2
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.2
This package is auto-updated.
Last update: 2024-11-05 16:17:55 UTC
README
Prefixed Logger
Wrapper to apply a prefix to all messages going into a logger.
Installation
composer require devlop/prefixed-logger
Usage
use Devlop\PrefixedLogger\PrefixedLogger;
$logger = new PrefixedLogger('[your prefix] ', $theOriginalLogger);
// then use it as you would use any other logger
$logger->info('something happened'); // '[your prefix] something happened';