From e2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 28 Nov 2014 02:05:14 +0100 Subject: log: fix order of log_unit_struct() to match other logging calls Also, while we are at it, introduce some syntactic sugar for creating ERRNO= and MESSAGE= structured logging fields. --- src/core/service.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/core/service.c') diff --git a/src/core/service.c b/src/core/service.c index 72e8f71e5f..a55be8f3ac 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2205,16 +2205,16 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { f = SERVICE_SUCCESS; } - log_unit_struct(f == SERVICE_SUCCESS ? LOG_DEBUG : LOG_NOTICE, - u->id, - "MESSAGE=%s: main process exited, code=%s, status=%i/%s", - u->id, sigchld_code_to_string(code), status, - strna(code == CLD_EXITED - ? exit_status_to_string(status, EXIT_STATUS_FULL) - : signal_to_string(status)), - "EXIT_CODE=%s", sigchld_code_to_string(code), - "EXIT_STATUS=%i", status, - NULL); + log_unit_struct(u->id, + f == SERVICE_SUCCESS ? LOG_DEBUG : LOG_NOTICE, + LOG_MESSAGE("%s: main process exited, code=%s, status=%i/%s", + u->id, sigchld_code_to_string(code), status, + strna(code == CLD_EXITED + ? exit_status_to_string(status, EXIT_STATUS_FULL) + : signal_to_string(status))), + "EXIT_CODE=%s", sigchld_code_to_string(code), + "EXIT_STATUS=%i", status, + NULL); if (f != SERVICE_SUCCESS) s->result = f; -- cgit v1.2.3-54-g00ecf