diff --git a/selfdrive/logmessaged.py b/selfdrive/logmessaged.py index 56e13e8028..91dcbb7e04 100755 --- a/selfdrive/logmessaged.py +++ b/selfdrive/logmessaged.py @@ -1,13 +1,7 @@ #!/usr/bin/env python3 import zmq -from logentries import LogentriesHandler import cereal.messaging as messaging - - -def get_le_handler(): - # setup logentries. we forward log messages to it - le_token = "e8549616-0798-4d7e-a2ca-2513ae81fa17" - return LogentriesHandler(le_token, use_tls=False, verbose=False) +from selfdrive.swaglog import get_le_handler def main(): diff --git a/selfdrive/swaglog.py b/selfdrive/swaglog.py index ef94fb91dc..005f6b701b 100644 --- a/selfdrive/swaglog.py +++ b/selfdrive/swaglog.py @@ -1,11 +1,18 @@ import os import logging +from logentries import LogentriesHandler import zmq from common.logging_extra import SwagLogger, SwagFormatter +def get_le_handler(): + # setup logentries. we forward log messages to it + le_token = "e8549616-0798-4d7e-a2ca-2513ae81fa17" + return LogentriesHandler(le_token, use_tls=False, verbose=False) + + class LogMessageHandler(logging.Handler): def __init__(self, formatter): logging.Handler.__init__(self)