]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Debug messages with timestamps.
authorMaria Matejka <mq@ucw.cz>
Mon, 28 Jun 2021 13:43:45 +0000 (15:43 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 22 Nov 2021 18:05:43 +0000 (19:05 +0100)
On most of current hardware, getting monotonic clock is fast enough to
get it and write for each debug message.

sysdep/unix/log.c

index dc2b14b37c481b42a8ee65af7a0b2608679dafe9..f48588b6175712522a9ba30fe0a9f1254813e533 100644 (file)
@@ -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)