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.
This commit is contained in:
Max Kellermann 2025-03-13 09:01:02 +01:00
parent 689d231809
commit c290e0b965

@ -81,10 +81,10 @@ EnableLogTimestamp() noexcept
static std::string_view
log_date() noexcept
{
static constexpr size_t LOG_DATE_BUF_SIZE = std::char_traits<char>::length("2025-01-22 15:43:14 : ") + 1;
static constexpr size_t LOG_DATE_BUF_SIZE = std::char_traits<char>::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