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
21 lines
379 B
PHP
21 lines
379 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
$DEBUG_LEVEL = \CoreLibs\Logging\Logger\Level::Debug;
|
|
|
|
if ($DEBUG_LEVEL->name == 'Debug') {
|
|
error_reporting(E_ALL);
|
|
}
|
|
|
|
// sample config
|
|
require 'config.php';
|
|
echo "FILE: " . BASE . LIB . "Error.Handling.php<br>";
|
|
require(BASE . LIB . "Error.Handling.php");
|
|
|
|
if ($var) {
|
|
echo "OUT<br>";
|
|
}
|
|
// this wll throw an error and also write
|
|
// asdfa(09);
|