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:
@@ -81,10 +81,10 @@ EnableLogTimestamp() noexcept
|
|||||||
static std::string_view
|
static std::string_view
|
||||||
log_date() noexcept
|
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];
|
static char buf[LOG_DATE_BUF_SIZE];
|
||||||
time_t t = time(nullptr);
|
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
|
#ifdef HAVE_SYSLOG
|
||||||
|
Reference in New Issue
Block a user