From: Jan Macku Date: Thu, 27 May 2021 10:25:51 +0000 (+0200) Subject: core: Hide "Deactivated successfully" message X-Git-Tag: v249-rc2~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=edf2ee22f54005d76b2fb8fdcc9c60974feb88bc;p=thirdparty%2Fsystemd.git core: Hide "Deactivated successfully" message Show message "Deactivated successfully" in debug mode (when manager is user) rather than in info mode. This message has low information value for regular users and it might be a bit overwhelming on a system with a lot of devices. --- diff --git a/src/core/unit.c b/src/core/unit.c index 4dc6ff08d69..0cfb2aa281f 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5520,7 +5520,11 @@ int unit_pid_attachable(Unit *u, pid_t pid, sd_bus_error *error) { void unit_log_success(Unit *u) { assert(u); - log_unit_struct(u, LOG_INFO, + /* Let's show message "Deactivated successfully" in debug mode (when manager is user) rather than in info mode. + * This message has low information value for regular users and it might be a bit overwhelming on a system with + * a lot of devices. */ + log_unit_struct(u, + MANAGER_IS_USER(u->manager) ? LOG_DEBUG : LOG_INFO, "MESSAGE_ID=" SD_MESSAGE_UNIT_SUCCESS_STR, LOG_UNIT_INVOCATION_ID(u), LOG_UNIT_MESSAGE(u, "Deactivated successfully."));