Implement $config['site']['logdebug']

This commit is contained in:
Diogo Cordeiro 2019-06-25 22:59:10 +01:00
parent 83a05724b8
commit 98c0c1ed53

View File

@ -1856,6 +1856,11 @@ function common_request_id()
function common_log($priority, $msg, $filename=null)
{
// Don't write LOG_DEBUG if that's not wanted
if ($priority === LOG_DEBUG && !common_config('site', 'logdebug')) {
return;
}
if (Event::handle('StartLog', [&$priority, &$msg, &$filename])) {
$msg = (empty($filename)) ? $msg : basename($filename) . ' - ' . $msg;
$msg = '[' . common_request_id() . '] ' . $msg;