From c290e0b9650ce7ee00133da67c88699c2b33ec92 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 13 Mar 2025 09:01:02 +0100 Subject: [PATCH] LogBackend: remove the colon after the time stamp This colon with spaces around it looked weird and was somewhat redundant. Let's use a space only. This looks better if we replace the space between date and time with a 'T', so it's mostly the ISO8601 format only in local time instead of UTC. --- src/LogBackend.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LogBackend.cxx b/src/LogBackend.cxx index 67c1e4caa..ec4bf0faa 100644 --- a/src/LogBackend.cxx +++ b/src/LogBackend.cxx @@ -81,10 +81,10 @@ EnableLogTimestamp() noexcept static std::string_view log_date() noexcept { - static constexpr size_t LOG_DATE_BUF_SIZE = std::char_traits::length("2025-01-22 15:43:14 : ") + 1; + static constexpr size_t LOG_DATE_BUF_SIZE = std::char_traits::length("2025-01-22T15:43:14 ") + 1; static char buf[LOG_DATE_BUF_SIZE]; time_t t = time(nullptr); - return FmtUnsafeSV(buf, "{:%F %T} : "sv, fmt::localtime(t)); + return FmtUnsafeSV(buf, "{:%FT%T} "sv, fmt::localtime(t)); } #ifdef HAVE_SYSLOG