From 5594e69bf6fd140dc159d791ce107b6b8b674ee6 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Fri, 10 Jul 2015 23:20:30 +0200 Subject: [PATCH] Use a new logfile when day changed --- src/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index 84922eb..26fa24d 100644 --- a/src/log.c +++ b/src/log.c @@ -392,7 +392,8 @@ logstore_t *log_find_file(log_t *logdata, const char *destination) time(&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; /* day changed, we might want to rotate logfile */