chiark / gitweb /
log: don't downgrade log level in non-PID 1 if "quiet" is passed on kernel cmdline
authorLennart Poettering <lennart@poettering.net>
Mon, 16 Jun 2014 23:05:39 +0000 (01:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Jun 2014 00:43:44 +0000 (02:43 +0200)
"debug" should apply to all tools, but "quiet" only to PID1.

src/core/main.c
src/shared/log.c

index 3e57f07c422dafd17f8b0535feb0a9671a8741f8..4ad3bc2c573bd5329520e0646768eaccd1d505a0 100644 (file)
@@ -412,11 +412,16 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
                 }
 
         } else if (streq(key, "quiet") && !value) {
+
+                log_set_max_level(LOG_NOTICE);
+
                 if (arg_show_status == _SHOW_STATUS_UNSET)
                         arg_show_status = SHOW_STATUS_AUTO;
 
         } else if (streq(key, "debug") && !value) {
+
                 log_set_max_level(LOG_DEBUG);
+
                 if (detect_container(NULL) > 0)
                         log_set_target(LOG_TARGET_CONSOLE);
 
index 6f17705abfad8869717f9522f570d7e892486102..9039db34964dc5230aaaa2c357b644026b491292 100644 (file)
@@ -878,9 +878,6 @@ void log_parse_environment(void) {
                         if (l == 5 && startswith(w, "debug")) {
                                 log_set_max_level(LOG_DEBUG);
                                 break;
-                        } else if (l == 5 && startswith(w, "quiet")) {
-                                log_set_max_level(LOG_WARNING);
-                                break;
                         }
                 }
         }