summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 02:05:14 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 02:18:46 +0100
commite2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e (patch)
tree874e0dac2d1426e44c3e748734cbb297f3feefa8 /src/core/service.c
parent6c861f0aeff9449ee1201bb56f89861921e41c45 (diff)
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.
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c20
1 files changed, 10 insertions, 10 deletions
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;