chiark / gitweb /
log: correct usage of logging API at a few places
authorLennart Poettering <lennart@poettering.net>
Fri, 13 Jul 2012 13:45:45 +0000 (15:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Jul 2012 13:45:45 +0000 (15:45 +0200)
src/machine-id-setup/machine-id-setup-main.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/udevadm.c
src/udev/udevd.c

index 60f9ef8..6373ebc 100644 (file)
@@ -91,7 +91,6 @@ static int parse_argv(int argc, char *argv[]) {
 int main(int argc, char *argv[]) {
         int r;
 
-        log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
         log_open();
 
index 2e74a25..2ab3401 100644 (file)
@@ -738,6 +738,7 @@ static int parse_argv(int argc, char *argv[]) {
 int main(int argc, char *argv[]) {
         int r;
 
+        log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
         log_open();
 
index 5217d7f..818edee 100644 (file)
@@ -99,8 +99,8 @@ int main(int argc, char *argv[])
         if (udev == NULL)
                 goto out;
 
-        log_open();
         log_parse_environment();
+        log_open();
         udev_set_log_fn(udev, udev_main_log);
         label_init("/dev");
 
index 176e4e2..ee78b39 100644 (file)
@@ -1083,8 +1083,9 @@ int main(int argc, char *argv[])
         if (udev == NULL)
                 goto exit;
 
-        log_open();
+        log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
+        log_open();
         udev_set_log_fn(udev, udev_main_log);
         log_debug("version %s\n", VERSION);
         label_init("/dev");