-#!/usr/bin/python
+#!/usr/bin/env python3
"""
A reroutable logger that can handle deep tracebacks
# pylint: disable=c0111, c0103, w1201
-from __future__ import print_function
+
import os
import os.path
# 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'
level = 'DEBUG'
elif context == 'console':
handlername = 'stdout'
- filename = 'ignored'
+ #filename = 'ignored'
level = 'INFO'
else:
print("Cannot configure logging - exiting")