mirror of https://github.com/1okko/openpilot.git
Can't import from logmessaged if build fails
This commit is contained in:
parent
dd05d1df83
commit
60f6e12deb
|
@ -1,13 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import zmq
|
import zmq
|
||||||
from logentries import LogentriesHandler
|
|
||||||
import cereal.messaging as messaging
|
import cereal.messaging as messaging
|
||||||
|
from selfdrive.swaglog import get_le_handler
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from logentries import LogentriesHandler
|
||||||
import zmq
|
import zmq
|
||||||
|
|
||||||
from common.logging_extra import SwagLogger, SwagFormatter
|
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):
|
class LogMessageHandler(logging.Handler):
|
||||||
def __init__(self, formatter):
|
def __init__(self, formatter):
|
||||||
logging.Handler.__init__(self)
|
logging.Handler.__init__(self)
|
||||||
|
|
Loading…
Reference in New Issue