log: caller can control syslog level

This commit is contained in:
Daniel Eklöf 2019-12-17 19:07:28 +01:00
parent 7a3fb9284e
commit a0fcec3a3d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 19 additions and 7 deletions

4
main.c
View file

@ -165,6 +165,8 @@ main(int argc, char *const *argv)
}
}
log_init(as_server ? LOG_FACILITY_DAEMON : LOG_FACILITY_USER, LOG_CLASS_WARNING);
argc -= optind;
argv += optind;
@ -176,8 +178,6 @@ 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);
if ((fdm = fdm_init()) == NULL)
goto out;