Description

The Logger class is used to log data.

It requires two objects to do something useful:

1) an EntryFactoryInterface that creates a log entry object based on the parameters to log(), and

2) a HandlerInterface object that does something with that log entry object.

$interpolator = new PlaceholderInterpolator(new Stringifier); $factory = new DeferredEntryFactory($interpolator); $handler = new FileHandler('/tmp/my.log'); $logger = new mef\Log\Logger($factory, $handler); $logger->info('Hello, {name}', ['name' => 'Matthew']);

The above code sets up a DeferredEntryFactory (it defers any processing until the log entry is handled) and a file based handler. The interpolator is used to replace the placeholders with actual data.

Note that you can use the StandardLogger class to avoid setting up all of these objects yourself.

Type hierarchy

lionsad/service_container 1.0.0-beta5
minchal/vero dev-master
mrcnpdlk/imdbphp v4.1.1
lionsad/service_container 1.0.0-beta5
minchal/vero dev-master

Class usage:

This class is used in:
Class Package
mef\Log\LoggerAwareInterface
mefworks/log dev-master
mef\Log\Handler\FinalStrawHandler
mefworks/log dev-master
mef\Log\LoggerAwareTrait
mefworks/log dev-master
mef\Log\FilterTrait
mefworks/log dev-master
mef\Log\LoggerAwareInterface
mefworks/log v1.0.0
mef\Log\Handler\FinalStrawHandler
mefworks/log v1.0.0
mef\Log\LoggerAwareTrait
mefworks/log v1.0.0
mef\Log\FilterTrait
mefworks/log v1.0.0