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

psr/log dev-master 1.1.0
View more packages
mediawiki/mediawiki-core-vendor dev-master
farmani/yii2-resque dev-master v1.2.2
imdbphp/imdbphp v4.1.x-dev v4.1.1
minchal/vero dev-master
resque/yii2-resque dev-master
sammet/gestion-colecciones dev-master
zzh-php/lib dev-master 1.1.0.x-dev
datasift/stone dev-master 1.10.3
lionsad/service_container 1.0.0-beta5
lionsad/service_container_libraries dev-master
gbv/jskos 0.1.11
slime/slime_interface dev-master 0.1
instituteweb/typo3-cms 6.2.31
goragod/kotchasan 1.0.0.x-dev dev-master
integer-net/solr-base 2.1.0 1.0.4 dev-master 3.3.0
amzn/login-and-pay-with-amazon-sdk-php 2.x-dev
psr-php7/log dev-master 1.0.0
amzn/amazon-pay-sdk-php 2.x-dev
typo3/cms 6.2.31
redweb-tn/codeigniter4 dev-master 4.0
redweb-tn/framework dev-master 4.0
codeigniter4/framework dev-master 1.0 v4.0.0-alpha.5
rkr/amazon-pay-sdk-php 2.x-dev
ortnit/logger dev-master
mrcnpdlk/imdbphp v4.1.1
deathart/blogci4 dev-master
kaidenchen/yii2-resque-enhance dev-master 1.0 v0.2
instrye/cloudflare-partners-ci4 dev-master
psr/log dev-master 1.1.0
View more packages
mediawiki/mediawiki-core-vendor dev-master
farmani/yii2-resque dev-master v1.2.2
minchal/vero dev-master
resque/yii2-resque dev-master
lionsad/service_container 1.0.0-beta5
lionsad/service_container_libraries dev-master
amzn/login-and-pay-with-amazon-sdk-php 2.x-dev
gbv/jskos 0.1.11
slime/slime_interface dev-master 0.1
amzn/amazon-pay-sdk-php 2.x-dev
goragod/kotchasan dev-master
integer-net/solr-base 2.1.0 1.0.4 dev-master 3.3.0
psr-php7/log dev-master 1.0.0
redweb-tn/codeigniter4 dev-master 4.0
redweb-tn/framework dev-master 4.0
codeigniter4/framework dev-master 1.0 v4.0.0-alpha.5
rkr/amazon-pay-sdk-php 2.x-dev
ortnit/logger dev-master
deathart/blogci4 dev-master
kaidenchen/yii2-resque-enhance dev-master 1.0 v0.2
instrye/cloudflare-partners-ci4 dev-master

Class usage:

This class is used in:
Class Package
Jobsity\PhpTick\Http\ApiClient
jobsity/php-tick dev-master
Jobsity\PhpTick\Http\ApiClient
jobsity/php-tick 1.0.0
mef\Log\LoggerAwareTrait
mefworks/log dev-master
mef\Log\LoggerAwareInterface
mefworks/log dev-master
mef\Log\FilterTrait
mefworks/log dev-master
mef\Log\Handler\FinalStrawHandler
mefworks/log dev-master
mef\Log\LoggerAwareTrait
mefworks/log v1.0.0
mef\Log\LoggerAwareInterface
mefworks/log v1.0.0
mef\Log\Handler\FinalStrawHandler
mefworks/log v1.0.0
mef\Log\FilterTrait
mefworks/log v1.0.0