]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Rspamadm: Move all warnings to stderr instead of stdin
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Apr 2021 13:33:32 +0000 (14:33 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Apr 2021 13:33:32 +0000 (14:33 +0100)
src/libserver/logger/logger_console.c

index 9aad85f6e37d7af87e3d33ecc8773256a213557e..c7857bdfeff423d8d808559e5249e371801485d7 100644 (file)
@@ -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