summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-12-15 15:57:19 +0100
committerDaniel Mack <github@zonque.org>2015-12-15 15:57:19 +0100
commit523f8874c650bd9b72e19f92963464e0c246374d (patch)
tree75844ccc0b1f07f2024f7853b538c4ffc9627eef
parent277b4cb5a63d0cf04772d4534c17f300a3b930d0 (diff)
parent4cee3a78bb9190a823ca08808c451daa802622e1 (diff)
Merge pull request #2157 from keszybz/manager-status
Manager status
-rw-r--r--src/core/dbus-manager.c5
-rw-r--r--src/core/manager.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 61bd0f8d5f..8a523cc8ac 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -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(
diff --git a/src/core/manager.c b/src/core/manager.c
index 34dd715e93..e65616adc1 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1885,23 +1885,21 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
switch (sfsi.ssi_signo - SIGRTMIN) {
case 20:
- log_debug("Enabling showing of status.");
manager_set_show_status(m, SHOW_STATUS_YES);
break;
case 21:
- log_debug("Disabling showing of status.");
manager_set_show_status(m, SHOW_STATUS_NO);
break;
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:
@@ -2961,6 +2959,9 @@ void manager_set_show_status(Manager *m, ShowStatus mode) {
if (m->running_as != MANAGER_SYSTEM)
return;
+ if (m->show_status != mode)
+ log_debug("%s showing of status.",
+ mode == SHOW_STATUS_NO ? "Disabling" : "Enabling");
m->show_status = mode;
if (mode > 0)