chiark / gitweb /
share/log: change log_syntax from "[a:b] " to "a:b: "
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 11 Dec 2016 19:37:12 +0000 (14:37 -0500)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000 (17:58 +0200)
Those square brackets don't fit how our other messages look like; we use colons
everywhere else. The "[a:b]" format was originally added in
ed5bcfbe3c3b68e59242c03649eea03a9707d318, and remained unchanged for 7 years,
but in the meantime other conventions evolved.

The new version is also one character shorter.

[/etc/elogind/system/elogind-networkd.service.d/override.conf:2] Failed to parse sec value, ignoring: ...
  ↓
/etc/elogind/system/elogind-networkd.service.d/override.conf:2: Failed to parse sec value, ignoring: ...

src/basic/log.c

index 62af163..7f4ed87 100644 (file)
@@ -1184,7 +1184,7 @@ int log_syntax_internal(
                         LOG_MESSAGE_ID(SD_MESSAGE_INVALID_CONFIGURATION),
                         "CONFIG_FILE=%s", config_file,
                         "CONFIG_LINE=%u", config_line,
-                        LOG_MESSAGE("[%s:%u] %s", config_file, config_line, buffer),
+                        LOG_MESSAGE("%s:%u: %s", config_file, config_line, buffer),
                         unit_fmt, unit,
                         NULL);
 }