Merge branch 'remicollet-issue-logfilename'

pull/5838/head
Aleksander Machniak 8 years ago
commit a1117c5bcb

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Add .log suffix to all log file names, add option log_file_ext to control this (#313)
- Archive: Fix archiving by sender address on cyrus-imap
- Archive: Add Thunderbird compatible Month option (#5623)
- Return "401 Unauthorized" status when login fails (#5663)

@ -77,6 +77,9 @@ $config['log_date_format'] = 'd-M-Y H:i:s O';
// set to 0 to avoid session IDs being logged.
$config['log_session_id'] = 8;
// Default extension used for log file name
$config['log_file_ext'] = '.log';
// Syslog ident string to use, if using the 'syslog' log driver.
$config['syslog_id'] = 'roundcube';

@ -1254,6 +1254,13 @@ class rcube
$log_dir = RCUBE_INSTALL_PATH . 'logs';
}
if (self::$instance) {
$name .= self::$instance->config->get('log_file_ext', '.log');
}
else {
$name .= '.log';
}
return file_put_contents("$log_dir/$name", $line, FILE_APPEND) !== false;
}

Loading…
Cancel
Save