Skip to content

Commit

Permalink
[Minor] Use floating point ts instead of microseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Oct 30, 2023
1 parent 52c535a commit e50a30c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libserver/logger/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,15 +1094,15 @@ 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\", "
"\"id\": \"%*.s\", "
"\"module\": \"%s\", "
"\"function\": \"%s\", "
"\"message\": \"",
(gint64) (ts * 1e6),
ts,
logger->pid,
rspamd_get_log_severity_string(level_flags),
logger->process_type,
Expand Down

0 comments on commit e50a30c

Please sign in to comment.