Logging: prepare message only if log level is high enough
Also some clean ups on internal method call parameters
This commit is contained in:
@@ -76,7 +76,12 @@ with
|
||||
and > and <
|
||||
EOM));
|
||||
$log->info('Info message', ['info' => 'log']);
|
||||
$log->notice('Notice message', ['notice' => 'log']);
|
||||
$log->warning('Warning message', ['warning' => 'log']);
|
||||
$log->error('Cannot process data', ['error' => 'log']);
|
||||
$log->critical('Critical message', ['critical' => 'log']);
|
||||
$log->alert('Alert message', ['Alert' => 'log']);
|
||||
$log->emergency('Emergency message', ['Emergency' => 'log']);
|
||||
print "Log File: " . $log->getLogFile() . "<br>";
|
||||
|
||||
$log->setLogFlag(Flag::per_run);
|
||||
|
||||
Reference in New Issue
Block a user