From: Lennart Poettering Date: Wed, 18 Dec 2013 04:09:53 +0000 (+0100) Subject: core: in a container log to /dev/console if "debug" is specified X-Git-Tag: v209~831 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=220ec97ad65150542bb9c8a1ba20b19ea0d49ff8;ds=sidebyside core: in a container log to /dev/console if "debug" is specified --- diff --git a/src/core/main.c b/src/core/main.c index e00d0702f..eac4fe613 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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;