lf4php / lf4php-monolog
This is an lf4php binding for Monolog.
Installs: 31 702
Dependents: 1
Suggesters: 1
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.1
- lf4php/lf4php: ~5.0
- monolog/monolog: ~1.2
Requires (Dev)
- phpunit/phpunit: 7.0.2
README
This is a Monolog binding for lf4php.
Using lf4php-monolog
Configuration
<?php // configuring monolog loggers $monolog1 = new \Monolog\Logger('foo'); $monolog2 = new \Monolog\Logger('bar'); // registering them for lf4php $loggerFactory = StaticLoggerBinder::$SINGLETON->getLoggerFactory(); $loggerFactory->setRootMonologLogger($monolog1); $loggerFactory->registerMonologLogger($monolog2);
Logging
<?php $logger = LoggerFactory::getLogger(__CLASS__); $logger->info('Message'); $logger->debug('Hello {}!', array('John')); $logger->error(new \Exception());
History
3.1
MDC support.
3.0
Updated lf4php (3.0.x)