Skip to content

This package contains a PSR-3 compatible logger that wrap a set of loggers

License

Notifications You must be signed in to change notification settings

thecodingmachine/utils.log.psr.multi-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this package

This package contains a PSR-3 compliant composite logger class.

In practice, this class does not log anything but delegates logging to one or many PSR-3 compliant loggers. This is useful when you want to call multiple loggers at one.

Install

composer require mouf/utils.log.psr.multi-logger

Usage

Simply pass an array of loggers to the multi-logger:

$logger1 = new MyLogger();
$logger2 = new AnotherLogger();

$multiLogger = new Mouf\Utils\Log\Psr\MultiLogger([ $logger1, $logger2 ]);

You can also add loggers using the addLogger method:

$logger1 = new MyLogger();
$logger2 = new AnotherLogger();

$multiLogger = new Mouf\Utils\Log\Psr\MultiLogger();
$multiLogger->addLogger($logger1);
$multiLogger->addLogger($logger2);

About

This package contains a PSR-3 compatible logger that wrap a set of loggers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages