Use configured log_file_ext also for errors thrown by PHP (#6035)

pull/6037/head
Aleksander Machniak 7 years ago
parent b9687ca345
commit 4dc1f3b757

@ -246,14 +246,14 @@ class rcube_config
// set PHP error logging according to config // set PHP error logging according to config
if ($this->prop['debug_level'] & 1) { if ($this->prop['debug_level'] & 1) {
ini_set('log_errors', 1); $error_log = $this->prop['log_driver'];
if ($error_log != 'syslog') {
if ($this->prop['log_driver'] == 'syslog') { $error_log = $this->prop['log_dir'] . '/errors';
ini_set('error_log', 'syslog'); $error_log .= isset($this->prop['log_file_ext']) ? $this->prop['log_file_ext'] : '.log';
}
else {
ini_set('error_log', $this->prop['log_dir'].'/errors');
} }
ini_set('error_log', $error_log);
ini_set('log_errors', 1);
} }
// enable display_errors in 'show' level, but not for ajax requests // enable display_errors in 'show' level, but not for ajax requests

Loading…
Cancel
Save