diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-08-06 16:18:39 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-08-07 09:16:40 +0200 |
commit | a628cb93a775ffad28853c733cf10eceb0a53bbf (patch) | |
tree | 7bee0d5371c35357864a4209e994ad0690c3e9fe /test/nstool.c | |
parent | 2c7558dc43741850353a9739e08b48b25216ae1a (diff) | |
download | passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.tar passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.tar.gz passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.tar.bz2 passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.tar.lz passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.tar.xz passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.tar.zst passt-a628cb93a775ffad28853c733cf10eceb0a53bbf.zip |
log: Avoid duplicate calls to logtime()
We use logtime() to get a timestamp for the log in two places:
- in vlogmsg(), which is used only for debug_print messages
- in logfile_write() which is only used messages to the log file
These cases are mutually exclusive, so we don't ever print the same message
with different timestamps, but that's not particularly obvious to see.
It's possible future tweaks to logging logic could mean we log to two
different places with different timestamps, which would be confusing.
Refactor to have a single logtime() call in vlogmsg() and use it for all
the places we need it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/nstool.c')
0 files changed, 0 insertions, 0 deletions