Small improvement in log_dir handling

pull/6833/head
Aleksander Machniak 7 years ago
parent bb9db12a79
commit a5dac2e694

@ -1303,7 +1303,6 @@ class rcube
// log_driver == 'file' is assumed here
$line = sprintf("[%s]: %s\n", $date, $line);
$log_dir = null;
// per-user logging is activated
if (self::$instance && self::$instance->config->get('per_user_logging') && self::$instance->get_user_id()) {
@ -1312,12 +1311,15 @@ class rcube
return false;
}
}
else if (!empty($log['dir'])) {
if (empty($log_dir)) {
if (!empty($log['dir'])) {
$log_dir = $log['dir'];
}
else if (self::$instance) {
$log_dir = self::$instance->config->get('log_dir');
}
}
if (empty($log_dir)) {
$log_dir = RCUBE_INSTALL_PATH . 'logs';

Loading…
Cancel
Save