lf4php/lf4php-monolog

This is an lf4php binding for Monolog.

Installs: 2 315

Dependents: 1

Watchers: 1

Forks: 1

Language: PHP

3.1.1 2015-01-04 13:19 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)