summaryrefslogtreecommitdiffstats
path: root/src/debug-generator
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-04 10:56:44 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-12 10:48:38 +0100
commitaba311f7ffb1370156f48061a5fdc2da9551e57f (patch)
tree107e54267e8f0e749729565abfeb454e0b274743 /src/debug-generator
parentudev: introduce udev net_id "naming schemes" (diff)
downloadsystemd-aba311f7ffb1370156f48061a5fdc2da9551e57f.tar.xz
systemd-aba311f7ffb1370156f48061a5fdc2da9551e57f.zip
generators: configure logging before the first use
Diffstat (limited to 'src/debug-generator')
-rw-r--r--src/debug-generator/debug-generator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c
index 24bc4bd7e2..2615aa189d 100644
--- a/src/debug-generator/debug-generator.c
+++ b/src/debug-generator/debug-generator.c
@@ -145,6 +145,8 @@ static int generate_wants_symlinks(void) {
static int run(int argc, char *argv[]) {
int r, q;
+ log_setup_generator();
+
if (argc > 1 && argc != 4)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"This program takes three or no arguments.");
@@ -152,8 +154,6 @@ static int run(int argc, char *argv[]) {
if (argc > 1)
arg_dest = argv[2];
- log_setup_generator();
-
r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_RD_STRICT | PROC_CMDLINE_STRIP_RD_PREFIX);
if (r < 0)
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");