Update in class error/warning/etc calls instead of debug calls
For anything that is not debug use the proper reporting level
This commit is contained in:
@@ -34,6 +34,7 @@ $session = new \CoreLibs\Create\Session(EDIT_SESSION_NAME);
|
||||
$log = new CoreLibs\Logging\Logging([
|
||||
'log_folder' => BASE . LOG,
|
||||
'log_file_id' => BASE_NAME . 'EditBase',
|
||||
'log_level' => \CoreLibs\Logging\Logging::processLogLevel(DEBUG_LEVEL),
|
||||
'log_per_date' => true,
|
||||
'log_per_class' => true,
|
||||
]);
|
||||
|
||||
@@ -1855,7 +1855,7 @@ HTML;
|
||||
if ($login_user_id_changed > 0) {
|
||||
$this->login_user_id_unclear = true;
|
||||
// error for invalid user id?
|
||||
$this->log->debug('LOGIN USER ID', 'Invalid characters: '
|
||||
$this->log->error('LOGIN USER ID: Invalid characters: '
|
||||
. $login_user_id_changed . ' in loginUserId: '
|
||||
. $this->login_user_id . ' (' . $this->login_user_id_source . ')');
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ class ArrayIO extends \CoreLibs\DB\IO
|
||||
return $this->table_array;
|
||||
}
|
||||
if ($acl_limit === true && $this->base_acl_level < 100) {
|
||||
$this->log->debug('DB DELETE ERROR', 'ACL Limit on, Delete, '
|
||||
$this->log->error('DB DELETE ERROR: ACL Limit on, Delete, '
|
||||
. 'but base ACL level of 100 not met: ' . $this->base_acl_level);
|
||||
return $this->table_array;
|
||||
}
|
||||
@@ -406,7 +406,7 @@ class ArrayIO extends \CoreLibs\DB\IO
|
||||
}
|
||||
// early abort for new write with not enough ACL level
|
||||
if ($insert && $acl_limit === true && $this->base_acl_level < 100) {
|
||||
$this->log->debug('DB WRITE ERROR', 'ACL Limit on, Insert, '
|
||||
$this->log->error('DB WRITE ERROR: ACL Limit on, Insert, '
|
||||
. 'but base ACL level of 100 not met: ' . $this->base_acl_level);
|
||||
return $this->table_array;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ class ArrayIO extends \CoreLibs\DB\IO
|
||||
} // while ...
|
||||
|
||||
if (empty($q_data)) {
|
||||
$this->log->debug('DB WRITE ERROR', 'No data to write, possible through ACL');
|
||||
$this->log->error('DB WRITE ERROR: No data to write, possible through ACL');
|
||||
return $this->table_array;
|
||||
}
|
||||
|
||||
|
||||
@@ -706,7 +706,17 @@ class IO
|
||||
. \CoreLibs\Debug\Support::prAr($error_data)
|
||||
. ']';
|
||||
}
|
||||
$this->log->debug($debug_id, $error_string, $prefix);
|
||||
switch ($id) {
|
||||
case 'DB_ERROR':
|
||||
$this->log->error($debug_id . ' :' . $prefix . $error_string);
|
||||
break;
|
||||
case 'DB_WARNING':
|
||||
$this->log->warning($debug_id . ' :' . $prefix . $error_string);
|
||||
break;
|
||||
default:
|
||||
$this->log->debug($debug_id, $error_string, $prefix);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2735,7 +2745,7 @@ class IO
|
||||
}
|
||||
$result = $this->db_functions->__dbExecute($stm_name, $data);
|
||||
if ($result === false) {
|
||||
$this->log->debug('ExecuteData', 'ERROR in STM[' . $stm_name . '|'
|
||||
$this->log->error('ExecuteData: ERROR in STM[' . $stm_name . '|'
|
||||
. $this->prepare_cursor[$stm_name]['result'] . ']: '
|
||||
. \CoreLibs\Debug\Support::prAr($data));
|
||||
$this->__dbError(
|
||||
|
||||
@@ -389,7 +389,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
||||
$this->load_query = $config_array['load_query'];
|
||||
}
|
||||
if (empty($this->load_query)) {
|
||||
$this->log->debug('INIT ERROR', 'Missing Load Query for: ' . $this->my_page_name);
|
||||
$this->log->error('Missing Load Query for: ' . $this->my_page_name);
|
||||
}
|
||||
$this->archive_pk_name = 'a_' . $this->pk_name;
|
||||
$this->col_name = str_replace('_id', '', $this->pk_name);
|
||||
@@ -486,7 +486,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
||||
/** @var TableArrays\Interface\TableArraysInterface|false $class */
|
||||
$class = new $class_string($this);
|
||||
} catch (\Throwable $t) {
|
||||
$this->log->debug('CLASS LOAD', 'Failed loading: ' . $class_string . ' => ' . $t->getMessage());
|
||||
$this->log->critical('CLASS LOADING: Failed loading: ' . $class_string . ' => ' . $t->getMessage());
|
||||
return false;
|
||||
}
|
||||
if (is_object($class)) {
|
||||
@@ -828,7 +828,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
||||
return $return_array;
|
||||
}
|
||||
if (empty($this->load_query)) {
|
||||
$this->log->debug('LOAD LIST ERROR', 'Missing load list query');
|
||||
$this->log->error('Missing load list query');
|
||||
return $return_array;
|
||||
}
|
||||
|
||||
@@ -2618,7 +2618,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
||||
}
|
||||
}
|
||||
// add lost error ones
|
||||
$this->log->debug('ERROR', 'P: ' . $data['prefix'] . ', '
|
||||
$this->log->error('P: ' . $data['prefix'] . ', '
|
||||
. Support::prAr($_POST['ERROR'][$data['prefix']] ?? []));
|
||||
if ($this->error && !empty($_POST['ERROR'][$data['prefix']])) {
|
||||
$prfx = $data['prefix']; // short
|
||||
|
||||
Reference in New Issue
Block a user