MXS-1322 When flushing the log file, it will not be truncated
Earlier when the log file was flushed, it was also truncated, which meant that the log content was log, unless the file first was moved. Now it will only be opened. Thus, no data can be lost due to the operation. If logrotate it used, the end result will be the same, as the file is moved first.
This commit is contained in:
parent
ba5a321ec3
commit
6ba3193d5f
@ -2147,7 +2147,7 @@ static bool thr_flush_file(logmanager_t *lm, filewriter_t *fwr)
|
||||
skygw_file_close(fwr->fwr_file);
|
||||
fwr->fwr_file = NULL;
|
||||
|
||||
if (!logfile_open_file(fwr, lf, SKYGW_OPEN_TRUNCATE, log_config.do_maxlog))
|
||||
if (!logfile_open_file(fwr, lf, SKYGW_OPEN_APPEND, log_config.do_maxlog))
|
||||
{
|
||||
LOG_ERROR("MaxScale Log: Error, could not re-open log file %s.\n",
|
||||
lf->lf_full_file_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user