1
0
forked from bip/bip

Use a new logfile when day changed

This commit is contained in:
Pierre-Louis Bonicoli 2015-07-10 23:20:30 +02:00
parent bdec94020e
commit 5594e69bf6

View File

@ -392,7 +392,8 @@ logstore_t *log_find_file(log_t *logdata, const char *destination)
time(&t); time(&t);
ltime = localtime(&t); ltime = localtime(&t);
if (ltime->tm_hour != lf->last_log.tm_hour) { if (ltime->tm_year != lf->last_log.tm_year ||
ltime->tm_yday != lf->last_log.tm_yday) {
logfile_t *oldlf; logfile_t *oldlf;
/* day changed, we might want to rotate logfile */ /* day changed, we might want to rotate logfile */