chiark / gitweb /
core: in a container log to /dev/console if "debug" is specified
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Dec 2013 04:09:53 +0000 (05:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Dec 2013 17:21:27 +0000 (18:21 +0100)
src/core/main.c

index e00d070..eac4fe6 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;