chiark / gitweb /
core: in a container log to /dev/console if "debug" is specified
[elogind.git] / src / core / main.c
index e00d0702fe2892dbe47ae84ef0cf22d00a3ff341..eac4fe613409cd5edf9d562900e23bb7d82bcde8 100644 (file)
@@ -417,7 +417,7 @@ static int parse_proc_cmdline_word(const char *word) {
                  * will block with every log message for for 60 seconds,
                  * before they give up. */
                 log_set_max_level(LOG_DEBUG);
-                log_set_target(LOG_TARGET_KMSG);
+                log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_KMSG);
         } else if (!in_initrd()) {
                 unsigned i;