Add new Logging option to turn on error_log write

On default the level for error_log write is Emergency.
This can be changed either on class creation or via set/get methods.

If logging is skipped because the logging level does not match the main logging level the error_log write is also skipped.

Added MARK fields in the Logging class
This commit is contained in:
Clemens Schwaighofer
2025-06-05 15:32:39 +09:00
parent 73fc74a43a
commit 6c5af91386
3 changed files with 180 additions and 23 deletions

View File

@@ -82,6 +82,7 @@ $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']);
error_log('TRIGGER ERROR LOG MANUAL: Emergency');
print "Log File: " . $log->getLogFile() . "<br>";
$log->setLogFlag(Flag::per_run);