chiark / gitweb /
cgls: don't strip user processes and kernel threads from default output
[elogind.git] / src / main.c
index 313afcce166d2f7bc0d82130930751c980cf7a78..0c805c98a9f89fe010fe837a47ef72f33412af00 100644 (file)
@@ -1021,7 +1021,7 @@ int main(int argc, char *argv[]) {
 
         if (getpid() == 1) {
                 arg_running_as = MANAGER_SYSTEM;
-                log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
+                log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_SYSLOG_OR_KMSG);
 
                 /* This might actually not return, but cause a
                  * reexecution */