From 55a23a5b290140816a7f7c215ef90c8af1cb82ef Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 20 Nov 2019 19:43:31 +0100 Subject: log: set syslog facility to LOG_DAEMON when run in server mode --- main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 4a392533..f241e52d 100644 --- a/main.c +++ b/main.c @@ -190,6 +190,8 @@ main(int argc, char *const *argv) struct server *server = NULL; struct shutdown_context shutdown_ctx = {.term = &term, .exit_code = EXIT_FAILURE}; + log_init(as_server ? LOG_FACILITY_DAEMON : LOG_FACILITY_USER); + /* This ensures we keep a set of fonts in the cache */ if (!initialize_fonts(&conf, fonts)) goto out; @@ -241,5 +243,6 @@ out: font_destroy(fonts[i]); config_free(conf); + log_deinit(); return ret == EXIT_SUCCESS && !as_server ? shutdown_ctx.exit_code : ret; } -- cgit v1.3