Skip to content

Flynsarmy/Slim-Monolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Monolog Logging for Slim Framework

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.

About

Monolog logging support for Slim Framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages