summaryrefslogtreecommitdiff
path: root/src/logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logger.c')
-rw-r--r--src/logger.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/logger.c b/src/logger.c
index d4d964d1bb..3d69fcf2cd 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -548,8 +548,6 @@ int main(int argc, char *argv[]) {
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
- log_info("systemd-logger running as pid %lu", (unsigned long) getpid());
-
if ((n = sd_listen_fds(true)) < 0) {
log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
return 1;
@@ -563,6 +561,8 @@ int main(int argc, char *argv[]) {
if (server_init(&server, (unsigned) n) < 0)
return 3;
+ log_debug("systemd-logger running as pid %lu", (unsigned long) getpid());
+
sd_notify(false,
"READY=1\n"
"STATUS=Processing requests...");
@@ -588,15 +588,16 @@ int main(int argc, char *argv[]) {
if ((k = process_event(&server, &event)) < 0)
goto fail;
}
+
r = 0;
+ log_info("systemd-logger stopped as pid %lu", (unsigned long) getpid());
+
fail:
sd_notify(false,
"STATUS=Shutting down...");
server_done(&server);
- log_info("systemd-logger stopped as pid %lu", (unsigned long) getpid());
-
return r;
}