summaryrefslogtreecommitdiff
path: root/src/core/log.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-25 21:10:05 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-25 21:10:05 +0000
commit776895eeac1e0936824ab4419ed5bbf77878576c (patch)
tree6d18c2ce139041b6318832a3c1e5cd366d167707 /src/core/log.c
parent9a2b8e95edeb8fef951c742474d1bcdf39fb492c (diff)
downloadirssi-776895eeac1e0936824ab4419ed5bbf77878576c.zip
log_day_change was never printed in logs.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@629 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/log.c')
-rw-r--r--src/core/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/log.c b/src/core/log.c
index 1ca26a73..92f90043 100644
--- a/src/core/log.c
+++ b/src/core/log.c
@@ -170,17 +170,19 @@ void log_write_rec(LOG_REC *log, const char *str)
day = tm->tm_mday;
tm = localtime(&log->last);
+ day -= tm->tm_mday; /* tm breaks in log_rotate_check() .. */
if (tm->tm_hour != hour) {
/* hour changed, check if we need to rotate log file */
log_rotate_check(log);
}
- if (tm->tm_mday != day) {
+ if (day != 0) {
/* day changed */
log_write_timestamp(log->handle,
settings_get_str("log_day_changed"),
"\n", now);
}
+
log->last = now;
log_write_timestamp(log->handle, log_timestamp, str, now);