From 0a187639a1d00549ccc45fe0436fa972955207fe Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 1 Apr 2019 16:49:40 +0200 Subject: [PATCH] server instances also log onto stdout for journalctl to handle --- sfa/util/sfalogging.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sfa/util/sfalogging.py b/sfa/util/sfalogging.py index fd1cabfe..9afc334b 100644 --- a/sfa/util/sfalogging.py +++ b/sfa/util/sfalogging.py @@ -121,8 +121,9 @@ logging.setLoggerClass(SfaLogger) # have the same set of keys def logging_config(context): if context == 'server': - handlername = 'file' - filename = '/var/log/sfa.log' + # use stdout and let journalctl do the heavy lifting + handlername = 'stdout' + #filename = '/var/log/sfa.log' level = 'DEBUG' elif context == 'import': handlername = 'file' @@ -134,7 +135,7 @@ def logging_config(context): level = 'DEBUG' elif context == 'console': handlername = 'stdout' - filename = 'ignored' + #filename = 'ignored' level = 'INFO' else: print("Cannot configure logging - exiting") -- 2.43.0