summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-01 16:44:48 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-04 10:36:30 +0200
commit6b413782df728e895fdbeffed30c40c91cb05238 (patch)
treeae0f4a45f252e8336835b4d0bba03cecfc83a143 /src/udev/udevd.c
parentbdc3426870be2536dd807692420b7b86e7d76ab7 (diff)
downloadsystemd-6b413782df728e895fdbeffed30c40c91cb05238.tar.gz
systemd-6b413782df728e895fdbeffed30c40c91cb05238.tar.bz2
systemd-6b413782df728e895fdbeffed30c40c91cb05238.zip
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.
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 25a1095ff4..99efad5b06 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -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)