commit 9e7d4ba: [Minor] Rspamadm: Move all warnings to stderr instead of stdin

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 27 13:42:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-27 14:33:32 +0100
URL: https://github.com/rspamd/rspamd/commit/9e7d4ba97cab6bd022dbe98db466a201d097493d

[Minor] Rspamadm: Move all warnings to stderr instead of stdin

---
 src/libserver/logger/logger_console.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/libserver/logger/logger_console.c b/src/libserver/logger/logger_console.c
index 9aad85f6e..c7857bdfe 100644
--- a/src/libserver/logger/logger_console.c
+++ b/src/libserver/logger/logger_console.c
@@ -165,7 +165,12 @@ rspamd_log_console_log (const gchar *module, const gchar *id,
 		fd = priv->crit_fd;
 	}
 	else {
-		fd = priv->fd;
+		if (priv->log_rspamadm && (level_flags & G_LOG_LEVEL_WARNING)) {
+			fd = priv->crit_fd;
+		}
+		else {
+			fd = priv->fd;
+		}
 	}
 
 #ifndef DISABLE_PTHREAD_MUTEX


More information about the Commits mailing list