aboutgitcodebugslistschat
path: root/flow.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-08-12 10:20:34 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-08-12 16:21:53 +0200
commitfecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9 (patch)
tree80e21cdf36dae4dfe28de9b3e46886935fcfcdec /flow.c
parentbaccfb95ce0e30f64d052f710cd5fedc8c7426c1 (diff)
downloadpasst-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.tar
passt-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.tar.gz
passt-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.tar.bz2
passt-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.tar.lz
passt-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.tar.xz
passt-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.tar.zst
passt-fecb1b65b1ac4d95f6a3bd5b09c189119ecf46b9.zip
log: Don't prefix message with timestamp on --debug if it's a continuation
If we prefix the second part of messages printed through logmsg_perror() by the timestamp, on debug, we'll have two timestamps and a weird separator in the result, such as this beauty: 0.0013: Failed to clone process with detached namespaces0.0013: : Operation not permitted Add a parameter to logmsg() and vlogmsg() which indicates a message continuation. If that's set, don't print the timestamp in vlogmsg(). Link: https://github.com/moby/moby/issues/48257#issuecomment-2282875092 Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/flow.c b/flow.c
index bd5fa2b..687e9fd 100644
--- a/flow.c
+++ b/flow.c
@@ -279,7 +279,8 @@ void flow_log_(const struct flow_common *f, int pri, const char *fmt, ...)
else
type_or_state = FLOW_TYPE(f);
- logmsg(true, pri, "Flow %u (%s): %s", flow_idx(f), type_or_state, msg);
+ logmsg(true, false, pri,
+ "Flow %u (%s): %s", flow_idx(f), type_or_state, msg);
}
/**