Trying to weed out dual logging.
This commit is contained in:
parent
0e8bbb946d
commit
e0f1e1b5fd
|
|
@ -26,6 +26,16 @@ worker_history = oDict()
|
|||
instructions = oDict()
|
||||
args = {}
|
||||
|
||||
create_log = True
|
||||
|
||||
try:
|
||||
if 'log' in __builtins__.__dict__:
|
||||
create_log = False
|
||||
except:
|
||||
if 'log' in __builtins__:
|
||||
create_log = False
|
||||
|
||||
if create_log:
|
||||
import logging
|
||||
from systemd.journal import JournalHandler
|
||||
|
||||
|
|
@ -49,7 +59,6 @@ class LOG_LEVELS:
|
|||
DEBUG = 5
|
||||
|
||||
LOG_LEVEL = 4
|
||||
|
||||
def log(*msg, origin='UNKNOWN', level=5, **kwargs):
|
||||
if level <= LOG_LEVEL:
|
||||
msg = [item.decode('UTF-8', errors='backslashreplace') if type(item) == bytes else item for item in msg]
|
||||
|
|
|
|||
Loading…
Reference in New Issue