aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-20 18:43:31 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-20 18:43:31 +0000
commit55a23a5b290140816a7f7c215ef90c8af1cb82ef (patch)
treea72735324af8eadb10f78b7cf7e3f79f457ae282 /main.c
parentmain: mention why we initialize a font set (diff)
log: set syslog facility to LOG_DAEMON when run in server mode
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
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;
}