[gnome-software: 8/9] gs-debug: Fix output of warnings/errors to stderr




commit c39e1cd65371af1c74517fde112658b15104a06c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Feb 18 11:11:14 2021 +0000

    gs-debug: Fix output of warnings/errors to stderr
    
    They were accidentally being outputted to stdout when not output to a
    TTY.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 lib/gs-debug.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/gs-debug.c b/lib/gs-debug.c
index e3241af89..db09700c1 100644
--- a/lib/gs-debug.c
+++ b/lib/gs-debug.c
@@ -113,9 +113,9 @@ gs_log_writer_console (GLogLevelFlags log_level,
                        g_printerr ("%c[%dm%s\n%c[%dm", 0x1B, 31, log_message, 0x1B, 0);
                } else { /* to file */
                        if (tmp != NULL)
-                               g_print ("%s ", tmp);
-                       g_print ("%s ", domain->str);
-                       g_print ("%s\n", log_message);
+                               g_printerr ("%s ", tmp);
+                       g_printerr ("%s ", domain->str);
+                       g_printerr ("%s\n", log_message);
                }
                break;
        default:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]