From 67634c561c7d2ad6a8202a3925768d7f392c0140 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 8 Feb 2023 07:28:07 +0100 Subject: [PATCH] time: don't log debug messages from debug logging Bug: #5835. Fixes: 31793aface58 ("time: Replace struct timeval with scalar value") --- src/util-debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util-debug.c b/src/util-debug.c index e9cfc6637b..80509ae7ca 100644 --- a/src/util-debug.c +++ b/src/util-debug.c @@ -666,7 +666,9 @@ SCError SCLogMessage(const SCLogLevel log_level, const char *file, const unsigne } /* get ts here so we log the same ts to each output */ - SCTime_t ts = TimeGet(); + struct timeval tval; + gettimeofday(&tval, NULL); + SCTime_t ts = SCTIME_FROM_TIMEVAL(&tval); op_iface_ctx = sc_log_config->op_ifaces; while (op_iface_ctx != NULL) { -- 2.47.2