aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/logger
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-10-30 17:15:26 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-10-30 17:15:26 +0000
commite50a30ca356d1d0ac4398d672853cf74707a93d4 (patch)
treeb2799f61b267f23ef3be5a050b267901037f5bee /src/libserver/logger
parent52c535ad6a54176dc10d35b859f62f8e1ac7a7b2 (diff)
downloadrspamd-e50a30ca356d1d0ac4398d672853cf74707a93d4.tar.gz
rspamd-e50a30ca356d1d0ac4398d672853cf74707a93d4.zip
[Minor] Use floating point ts instead of microsecondslog_json
Diffstat (limited to 'src/libserver/logger')
-rw-r--r--src/libserver/logger/logger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/logger/logger.c b/src/libserver/logger/logger.c
index 33117f72f..e10dfd392 100644
--- a/src/libserver/logger/logger.c
+++ b/src/libserver/logger/logger.c
@@ -1094,7 +1094,7 @@ void rspamd_log_fill_iov(struct rspamd_logger_iov_ctx *iov_ctx,
/* Perform JSON logging */
guint slen = id ? strlen(id) : strlen("(NULL)");
slen = MIN(RSPAMD_LOG_ID_LEN, slen);
- r = rspamd_snprintf(tmpbuf, sizeof(tmpbuf), "{\"ts\": %L, "
+ r = rspamd_snprintf(tmpbuf, sizeof(tmpbuf), "{\"ts\": %f, "
"\"pid\": %P, "
"\"severity\": \"%s\", "
"\"worker_type\": \"%s\", "
@@ -1102,7 +1102,7 @@ void rspamd_log_fill_iov(struct rspamd_logger_iov_ctx *iov_ctx,
"\"module\": \"%s\", "
"\"function\": \"%s\", "
"\"message\": \"",
- (gint64) (ts * 1e6),
+ ts,
logger->pid,
rspamd_get_log_severity_string(level_flags),
logger->process_type,