mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 00:12:05 +08:00
log ERROR messages in qlogs too (#23425)
* log ERROR messages in qlogs too * own event * bump cereal Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
+1
-1
Submodule cereal updated: 70aeecf093...42542ee96c
@@ -17,7 +17,8 @@ def main() -> NoReturn:
|
||||
sock.bind("ipc:///tmp/logmessage")
|
||||
|
||||
# and we publish them
|
||||
pub_sock = messaging.pub_sock('logMessage')
|
||||
log_message_sock = messaging.pub_sock('logMessage')
|
||||
error_log_message_sock = messaging.pub_sock('errorLogMessage')
|
||||
|
||||
while True:
|
||||
dat = b''.join(sock.recv_multipart())
|
||||
@@ -29,7 +30,12 @@ def main() -> NoReturn:
|
||||
# then we publish them
|
||||
msg = messaging.new_message()
|
||||
msg.logMessage = record
|
||||
pub_sock.send(msg.to_bytes())
|
||||
log_message_sock.send(msg.to_bytes())
|
||||
|
||||
if level >= 40: # logging.ERROR
|
||||
msg = messaging.new_message()
|
||||
msg.errorLogMessage = record
|
||||
error_log_message_sock.send(msg.to_bytes())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user