adosaiguas/slim-analog

1.0.1 2014-07-31 16:26 UTC

README

This repository adds support for logging to Analog to the Slim Framework.

Ported from the Slim-Monolog project.

Installation

AnalogWriter takes a handler in its constructor.

$logger = new \Adosaiguas\SlimAnalog\Log\AnalogWriter(
	\Analog\Handler\Threshold::init (
		\Analog\Handler\File::init ($log_path),
		\Analog::DEBUG
	)
);

$app = new \Slim\Slim(array(
    'log.writer' => $logger,
));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the log writer class before instantiating it.

License

The Slim-Analog is released under the MIT public license.