From 58a47cc8260bb24ecb83c325cb126df67a76465c Mon Sep 17 00:00:00 2001 From: Jiri Konecny Date: Tue, 15 Oct 2024 18:00:31 +0200 Subject: [PATCH] Log stderr to journal only on supported platforms On my previous commit c9f931f773dadf9e46cfd7d5c56e66b56c08b844 I forgot this part :( Without it, the stderr is still redirected to journal all the time. --- pyanaconda/anaconda_logging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyanaconda/anaconda_logging.py b/pyanaconda/anaconda_logging.py index 90131176d8d..5c86de610ff 100644 --- a/pyanaconda/anaconda_logging.py +++ b/pyanaconda/anaconda_logging.py @@ -241,6 +241,9 @@ def stderrToJournal(self): Redirect Anaconda main process stderr to Journal, as otherwise this could end up writing all over the TUI on TTY1. """ + if not self.write_to_journal: + return + # create an appropriately named Journal writing stream anaconda_stderr_stream = journal.stream("anaconda", priority=journal.LOG_ERR) # redirect stderr of this process to the stream