flynsarmy / slim-monolog
Monolog logging support Slim Framework
Installs: 440 914
Dependents: 7
Suggesters: 0
Security: 0
Stars: 114
Watchers: 8
Forks: 17
Open Issues: 4
Requires
- php: >=5.3.0
- monolog/monolog: >=1.6.0
- slim/slim: >=2.3.0
This package is auto-updated.
Last update: 2024-11-10 08:22:12 UTC
README
This repository adds support for logging to Monolog to the Slim Framework.
Installation
MonologWriter takes an array of handlers, an array of processors and a logger name.
$logger = new \Flynsarmy\SlimMonolog\Log\MonologWriter(array( 'handlers' => array( new \Monolog\Handler\StreamHandler('./logs/'.date('Y-m-d').'.log'), ), )); $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-Monolog is released under the MIT public license.