]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
manager: log log level changes uniformly 2157/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 10 Dec 2015 02:29:38 +0000 (21:29 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 13 Dec 2015 19:53:52 +0000 (14:53 -0500)
Output the same message when a request to change the log level is
received over dbus and through a signal. From the user point of view
those two operations are very similar and it's easy to think that the
dbus operation didn't work when the expected message is not emitted.

Also "downgrade" the message level to info, since this is a normal
user initiated action.

src/core/dbus-manager.c
src/core/manager.c

index 5457b2451b92e6d1f9e7e3b60e91b767d95ebc2e..293750bbe7d387ea19948c70d57c6dd9060c6938 100644 (file)
@@ -229,7 +229,10 @@ static int property_set_log_level(
         if (r < 0)
                 return r;
 
-        return log_set_max_level_from_string(t);
+        r = log_set_max_level_from_string(t);
+        if (r == 0)
+                log_info("Setting log level to %s.", t);
+        return r;
 }
 
 static int property_get_n_names(
index 9f65e0ff32af06ba88fd7bb7b98698779cc55603..e65616adc1fe76f3cc2a604d81aaffe18453fbf9 100644 (file)
@@ -1894,12 +1894,12 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
 
                         case 22:
                                 log_set_max_level(LOG_DEBUG);
-                                log_notice("Setting log level to debug.");
+                                log_info("Setting log level to debug.");
                                 break;
 
                         case 23:
                                 log_set_max_level(LOG_INFO);
-                                log_notice("Setting log level to info.");
+                                log_info("Setting log level to info.");
                                 break;
 
                         case 24: