From: Maria Matejka Date: Mon, 28 Jun 2021 13:43:45 +0000 (+0200) Subject: Debug messages with timestamps. X-Git-Tag: 3.0-alpha0~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2af807357875f866f149b0f6db4d463d4533204;p=thirdparty%2Fbird.git Debug messages with timestamps. On most of current hardware, getting monotonic clock is fast enough to get it and write for each debug message. --- diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index dc2b14b37..f48588b61 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -439,6 +439,8 @@ done: void log_init_debug(char *f) { + clock_gettime(CLOCK_MONOTONIC, &dbg_time_start); + if (dbgf && dbgf != stderr) fclose(dbgf); if (!f)