mirror of
https://passt.top/passt
synced 2025-06-12 18:45:34 +02:00
log: Initialise timestamp for relative log time also if we use a log file
...not just for debug messages. Otherwise, timestamps in the log file are consistent but the starting point is not zero. Do this right away as we enter main(), so that the resulting timestamps are as closely as possible relative to when we start. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
327d9d482f
commit
e5c37ba0f4
3 changed files with 4 additions and 3 deletions
1
log.h
1
log.h
|
@ -44,6 +44,7 @@ void logmsg_perror(int pri, const char *format, ...)
|
|||
extern int log_trace;
|
||||
extern bool log_conf_parsed;
|
||||
extern bool log_runtime;
|
||||
extern struct timespec log_start;
|
||||
|
||||
void trace_init(int enable);
|
||||
#define trace(...) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue