chiark / gitweb /
Prep v231.2: Make sure logs go to syslog or kmsg if elogind was started in debug...
authorSven Eden <yamakuzure@gmx.net>
Wed, 28 Jun 2017 16:56:23 +0000 (18:56 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 28 Jun 2017 16:56:23 +0000 (18:56 +0200)
src/login/logind.c

index 77a11bb..dab6e7f 100644 (file)
@@ -1209,12 +1209,15 @@ int main(int argc, char *argv[]) {
         log_set_target(LOG_TARGET_AUTO);
         log_set_facility(LOG_AUTH);
         log_parse_environment();
-        log_open();
 
 #ifdef ENABLE_DEBUG_ELOGIND
         log_set_max_level(LOG_DEBUG);
+        log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
 #endif // ENABLE_DEBUG_ELOGIND
 
+        log_open();
+
+
         umask(0022);
 
         if (argc != 1) {