lf4php/lf4php-monolog

This is an lf4php binding for Monolog.

Installs: 6 690

Dependents: 1

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

3.1.2 2015-12-02 22:20 UTC

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)