From d595b6de33c85ec3bf7c81fc2eb5c4537bdfd786 Mon Sep 17 00:00:00 2001 From: tag Date: Thu, 27 Oct 2016 22:58:11 +0100 Subject: [PATCH] According to RFC3164, the day of month field in the timestamp should be formatted as two characters: "If the day of the month is less than 10, then it MUST be represented as a space and then the number. For example, the 7th day of August would be represented as "Aug 7", with two spaces between the "g" and the "7". The printf formatter "%2d" does this. "% 2d" will prepend an unwanted space, e.g. printf("Aug % 2d\n", 27) => Aug 27 --- src/syslog_backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syslog_backend.cpp b/src/syslog_backend.cpp index 2501b87..a1202be 100644 --- a/src/syslog_backend.cpp +++ b/src/syslog_backend.cpp @@ -377,7 +377,7 @@ BOOST_LOG_ANONYMOUS_NAMESPACE { ( packet, sizeof(packet), - "<%d>%s % 2d %02d:%02d:%02d %s %s", + "<%d>%s %2d %02d:%02d:%02d %s %s", pri, months[time_stamp->tm_mon], time_stamp->tm_mday,