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:
@@ -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();
|
||||
@@ -26,16 +21,12 @@ ob_end_flush();
|
||||
use CoreLibs\Convert\Encoding as ConEnc;
|
||||
use CoreLibs\Check\Encoding as ChkEnc;
|
||||
use CoreLibs\Convert\MimeEncode;
|
||||
use CoreLibs\Debug\Support;
|
||||
|
||||
$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 ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
'log_file_id' => $LOG_FILE_ID,
|
||||
'log_per_date' => true,
|
||||
]);
|
||||
// class type
|
||||
$_chk_enc = new CoreLibs\Check\Encoding();
|
||||
@@ -100,10 +91,7 @@ foreach ($enc_strings as $_string) {
|
||||
// static use
|
||||
$_string = $enc_strings[1];
|
||||
$string = $chk_enc::checkConvertEncoding($_string, 'UTF-8', 'ISO-2022-JP-MS');
|
||||
print "S::ENC CHECK: $_string: " . ($string === false ? '-OK-' : $log->prAr($string)) . "<br>";
|
||||
|
||||
// error message
|
||||
print $log->printErrorMsg();
|
||||
print "S::ENC CHECK: $_string: " . ($string === false ? '-OK-' : Support::printAr($string)) . "<br>";
|
||||
|
||||
print "</body></html>";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user