diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-06-12 16:00:48 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-06-12 16:04:52 +0200 |
commit | d40c908f9eb768c3f93ae7dc60ee7eb4c358ed4f (patch) | |
tree | 96dadc28c08cc8f39f9d1cd2073f7ce680de0e01 /common.py | |
parent | 3bd492be08a97c16c813bc57773028def5c69e23 (diff) |
common.py: Add a check for $JOURNAL_STREAM.
On the desktop's terminal window (systemd 256) $SYSTEMD_EXEC_PID exists
and points at the login(1) process, so checking $JOURNAL_STREAM is
needed to decide whether the process runs from a .service file or not.
This is due to an incomplete logic in
42cfe748e23bad6fc51b14a3e5896a77fdb5c1d5
Diffstat (limited to 'common.py')
-rw-r--r-- | common.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -32,7 +32,7 @@ def init_logger(app=__file__, level=logging.WARNING): log = logging.getLogger() log.setLevel(level) - if os.getenv('SYSTEMD_EXEC_PID', None) is None: + if os.getenv('SYSTEMD_EXEC_PID', None) is None or os.getenv('JOURNAL_STREAM', None) is None: ch = logging.StreamHandler() else: # started in systemd, use journald for filtering incl. coloring |