Blame SOURCES/0571-core-Hide-Deactivated-successfully-message.patch
|
|
698723 |
From 4dc498258bd0cce1bc8ad2311c5f12de5678e0af Mon Sep 17 00:00:00 2001
|
|
|
698723 |
From: Jan Macku <jamacku@redhat.com>
|
|
|
698723 |
Date: Thu, 27 May 2021 12:25:51 +0200
|
|
|
698723 |
Subject: [PATCH] core: Hide "Deactivated successfully" message
|
|
|
698723 |
|
|
|
698723 |
Show message "Deactivated successfully" in debug mode (when manager is
|
|
|
698723 |
user) rather than in info mode. This message has low information value
|
|
|
698723 |
for regular users and it might be a bit overwhelming on a system with
|
|
|
698723 |
a lot of devices.
|
|
|
698723 |
|
|
|
698723 |
(cherry picked from commit edf2ee22f54005d76b2fb8fdcc9c60974feb88bc)
|
|
|
698723 |
|
|
|
698723 |
Resolves: #1954802
|
|
|
698723 |
---
|
|
|
698723 |
src/core/unit.c | 5 ++++-
|
|
|
698723 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
698723 |
|
|
|
698723 |
diff --git a/src/core/unit.c b/src/core/unit.c
|
|
|
698723 |
index cd3e7c806d..93c13e58d9 100644
|
|
|
698723 |
--- a/src/core/unit.c
|
|
|
698723 |
+++ b/src/core/unit.c
|
|
|
698723 |
@@ -5525,7 +5525,10 @@ int unit_pid_attachable(Unit *u, pid_t pid, sd_bus_error *error) {
|
|
|
698723 |
void unit_log_success(Unit *u) {
|
|
|
698723 |
assert(u);
|
|
|
698723 |
|
|
|
698723 |
- log_struct(LOG_INFO,
|
|
|
698723 |
+ /* Let's show message "Deactivated successfully" in debug mode (when manager is user) rather than in info mode.
|
|
|
698723 |
+ * This message has low information value for regular users and it might be a bit overwhelming on a system with
|
|
|
698723 |
+ * a lot of devices. */
|
|
|
698723 |
+ log_struct(MANAGER_IS_USER(u->manager) ? LOG_DEBUG : LOG_INFO,
|
|
|
698723 |
"MESSAGE_ID=" SD_MESSAGE_UNIT_SUCCESS_STR,
|
|
|
698723 |
LOG_UNIT_ID(u),
|
|
|
698723 |
LOG_UNIT_INVOCATION_ID(u),
|