udevd: open log output early

We'd log to the "console", losing structured logs during configuration file parsing.
Let's be nice to journalctl users, and log to the journal immediately.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-07-01 16:44:48 +02:00
parent bdc3426870
commit 6b413782df
1 changed files with 2 additions and 1 deletions

View File

@ -1726,9 +1726,10 @@ static int run(int argc, char *argv[]) {
int r;
log_set_target(LOG_TARGET_AUTO);
log_open();
udev_parse_config_full(&arg_children_max, &arg_exec_delay_usec, &arg_event_timeout_usec, &arg_resolve_name_timing);
log_parse_environment();
log_open();
log_open(); /* Done again to update after reading configuration. */
r = parse_argv(argc, argv);
if (r <= 0)