mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
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 <troglobit@gmail.com>
This commit is contained in:
+2
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user