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();
|
||||
@@ -25,15 +20,10 @@ ob_end_flush();
|
||||
|
||||
use CoreLibs\Output\Image;
|
||||
|
||||
$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,
|
||||
]);
|
||||
$_image = new CoreLibs\Output\Image();
|
||||
$image_class = 'CoreLibs\Output\Image';
|
||||
@@ -95,7 +85,7 @@ foreach ($images as $image) {
|
||||
$image = BASE . LAYOUT . CONTENT_PATH . IMAGES . $image;
|
||||
list ($height, $width, $img_type) = \CoreLibs\Convert\SetVarType::setArray(getimagesize($image));
|
||||
echo "<div><b>IMAGE INFO</b>: " . $height . "x" . $width . ", TYPE: "
|
||||
. $log->prAr($img_type) . " [" . $finfo->file($image) . "]</div>";
|
||||
. \CoreLibs\Debug\Support::printArray($img_type) . " [" . $finfo->file($image) . "]</div>";
|
||||
// rotate image first
|
||||
Image::correctImageOrientation($image);
|
||||
// thumbnail tests
|
||||
@@ -119,9 +109,6 @@ foreach ($images as $image) {
|
||||
echo "<hr>";
|
||||
}
|
||||
|
||||
// error message
|
||||
print $log->printErrorMsg();
|
||||
|
||||
print "</body></html>";
|
||||
|
||||
// __END__
|
||||
|
||||
Reference in New Issue
Block a user