summaryrefslogtreecommitdiff
path: root/src/basic/log.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-22 23:45:27 +0100
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:59:04 +0200
commit623a5e5a3a0c054d09b64f92bf4f5f257b5d5ff5 (patch)
treefb6e7c3cff69f5efd345c5e37f9b166188231206 /src/basic/log.c
parent21b1e5ac6030ab760cf7ebd9971f50042e8629a1 (diff)
basic/log: fix confusion with parameters to log_dispatch_internal
log_dispatch_internal has only one caller where the extra_field/extra params are not null: log_unit_full. When log_unit_full() was called, when we got to log_dispatch_internal, our header would look like this: PRIORITY=7 SYSLOG_FACILITY=3 CODE_FILE=../src/core/manager.c CODE_LINE=2145 CODE_FUNC=manager_invoke_sigchld_event USER_UNIT=gnome-terminal-server.service 65dffa7a3b984a6d9a46f0b8fb57710bUSER_INVOCATION_ID= SYSLOG_IDENTIFIER=systemd It took me a while to understand why I'm not seeing mangled messages in the journal (after all, "" is a valid rvalue for log messages). The answer is that journald rejects any field name which starts with a digit, and the MESSAGE_ID that was used here starts with a digit. Hence, those lines would be silently filtered out.
Diffstat (limited to 'src/basic/log.c')
-rw-r--r--src/basic/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index 8398a326a..a11150513 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -591,8 +591,8 @@ int log_dispatch_internal(
const char *func,
const char *object_field,
const char *object,
- const char *extra,
const char *extra_field,
+ const char *extra,
char *buffer) {
assert(buffer);