From 272db0d41dd16dd0df07a135096172840c612f0e Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 15 Feb 2021 07:55:06 +0100 Subject: [PATCH] Use fallback to syslog if logit tool is not installed In the case of redirect to a logfile, if logit tool is not enabled, then log to syslog instead. Signed-off-by: Joachim Wiberg --- src/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index c3f54ad9..cb8399cf 100644 --- a/src/service.c +++ b/src/service.c @@ -217,9 +217,10 @@ static int lredirect(svc_t *svc) snprintf(num, sizeof(num), "%d", logfile_count_max); execlp("logit", "logit", "-f", svc->log.file, "-n", sz, "-r", num, NULL); - _exit(0); #else logit(LOG_INFO, "logit disabled, logging %s to syslog instead", svc->name); + fallback_logger(tag, prio); + _exit(0); #endif }