diff options
-rw-r--r-- | common.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -32,7 +32,9 @@ def init_logger(app=__file__, level=logging.WARNING): log = logging.getLogger() log.setLevel(level) - if os.getenv('SYSTEMD_EXEC_PID', None) is None or os.getenv('JOURNAL_STREAM', None) is None: + pid = os.getenv('SYSTEMD_EXEC_PID', None) + if (pid is None or int(pid) != os.getpid() + or os.getenv('JOURNAL_STREAM', None) is None): ch = logging.StreamHandler() else: # started in systemd, use journald for filtering incl. coloring |