9bf9751
From 626cb9f4d48010c575497ea7649287d87d5c1308 Mon Sep 17 00:00:00 2001
9bf9751
From: Kay Sievers <kay@vrfy.org>
9bf9751
Date: Sat, 5 Apr 2014 13:59:01 -0400
a59965a
Subject: [PATCH] reduce the amount of messages logged to /dev/kmsg when
a59965a
 "debug" is specified
9bf9751
9bf9751
(cherry picked from commit b2103dccb354de3f38c49c14ccb637bdf665e40f)
9bf9751
9bf9751
Conflicts:
9bf9751
	src/core/main.c
9bf9751
9bf9751
(cherry picked from commit c025499ceaf503d52f07a93fa8244f94fe6d6a73)
9bf9751
9bf9751
Conflicts:
9bf9751
	src/core/main.c
9bf9751
---
9bf9751
 src/core/main.c | 7 ++-----
9bf9751
 1 file changed, 2 insertions(+), 5 deletions(-)
9bf9751
9bf9751
diff --git a/src/core/main.c b/src/core/main.c
9bf9751
index 935762f..1ac1ba7 100644
9bf9751
--- a/src/core/main.c
9bf9751
+++ b/src/core/main.c
9bf9751
@@ -411,12 +411,9 @@ static int parse_proc_cmdline_word(const char *word) {
9bf9751
         } else if (streq(word, "quiet"))
9bf9751
                 arg_show_status = false;
9bf9751
         else if (streq(word, "debug")) {
9bf9751
-                /* Log to kmsg, the journal socket will fill up before the
9bf9751
-                 * journal is started and tools running during that time
9bf9751
-                 * will block with every log message for for 60 seconds,
9bf9751
-                 * before they give up. */
9bf9751
                 log_set_max_level(LOG_DEBUG);
9bf9751
-                log_set_target(LOG_TARGET_KMSG);
9bf9751
+                if (detect_container(NULL) > 0)
9bf9751
+                        log_set_target(LOG_TARGET_KMSG);
9bf9751
         } else if (!in_initrd()) {
9bf9751
                 unsigned i;
9bf9751