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:
@@ -391,18 +391,18 @@ class IO
|
||||
/** @var string */
|
||||
private $async_running;
|
||||
// logging class, must be public so settings can be changed
|
||||
/** @var \CoreLibs\Debug\Logging */
|
||||
/** @var \CoreLibs\Logging\Logging */
|
||||
public $log;
|
||||
|
||||
/**
|
||||
* main DB concstructor with auto connection to DB and failure set on failed connection
|
||||
* @param array<mixed> $db_config DB configuration array
|
||||
* @param \CoreLibs\Debug\Logging $log Logging class
|
||||
* @param \CoreLibs\Logging\Logging $log Logging class
|
||||
* @param bool|null $db_debug_override Overrides debug settings in db_config
|
||||
*/
|
||||
public function __construct(
|
||||
array $db_config,
|
||||
\CoreLibs\Debug\Logging $log,
|
||||
\CoreLibs\Logging\Logging $log,
|
||||
?bool $db_debug_override = null
|
||||
) {
|
||||
// attach logger
|
||||
@@ -703,10 +703,10 @@ class IO
|
||||
}
|
||||
if ($error_data !== []) {
|
||||
$error_string .= '<br>['
|
||||
. $this->log->prAr($error_data)
|
||||
. \CoreLibs\Debug\Support::prAr($error_data)
|
||||
. ']';
|
||||
}
|
||||
$this->log->debug($debug_id, $error_string, true, $prefix);
|
||||
$this->log->debug($debug_id, $error_string, $prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2737,7 +2737,7 @@ class IO
|
||||
if ($result === false) {
|
||||
$this->log->debug('ExecuteData', 'ERROR in STM[' . $stm_name . '|'
|
||||
. $this->prepare_cursor[$stm_name]['result'] . ']: '
|
||||
. $this->log->prAr($data));
|
||||
. \CoreLibs\Debug\Support::prAr($data));
|
||||
$this->__dbError(
|
||||
22,
|
||||
$this->prepare_cursor[$stm_name]['result'],
|
||||
|
||||
Reference in New Issue
Block a user