Logging class major change, Debug\Support update

old Debug\Logging is in Debug\LoggingLegacy and Debug\Logging extends
Logging\Logging

Logging\Logging is a new class with most of the functionality except
there is no more print/outout to screen, but we use the default log
levels (RFC5424)
The plan is to be a frontend between the old type class and
Monolog\Monolog

Updated all other classes to use new class interface
This commit is contained in:
Clemens Schwaighofer
2023-05-30 18:12:24 +09:00
parent 7b5ad92e66
commit b0a8783276
75 changed files with 4292 additions and 2019 deletions

View File

@@ -6,11 +6,6 @@
declare(strict_types=1);
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
$DEBUG_ALL = true;
$PRINT_ALL = true;
$DB_DEBUG = true;
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
ob_start();
@@ -27,15 +22,10 @@ $SET_SESSION_NAME = EDIT_SESSION_NAME;
ob_end_flush();
$session = new CoreLibs\Create\Session($SET_SESSION_NAME);
$log = new CoreLibs\Debug\Logging([
$log = new CoreLibs\Logging\Logging([
'log_folder' => BASE . LOG,
'file_id' => $LOG_FILE_ID,
// add file date
'print_file_date' => true,
// set debug and print flags
'debug_all' => $DEBUG_ALL,
'echo_all' => $ECHO_ALL,
'print_all' => $PRINT_ALL,
'log_file_id' => $LOG_FILE_ID,
'log_per_date' => true,
]);
// db config with logger
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
@@ -72,9 +62,6 @@ $backend->adbMsg('info', 'Message: %1$d', [1]);
print "Messaes: " . Support::printAr($backend->messages) . "<br>";
print "ADBPRINTDATETIME:<br>" . $backend->adbPrintDateTime(2021, 6, 21, 6, 38, '_test') . "<br>";
// error message
print $log->printErrorMsg();
print "</body></html>";
// __END__