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>
pull/23434/head
Willem Melching 2022-01-07 00:30:04 +01:00 committed by GitHub
parent 1a6881edc6
commit 45280754d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

2
cereal

@ -1 +1 @@
Subproject commit 70aeecf0930376a9da236b6f274941488e593063
Subproject commit 42542ee96ca00744e6117d57533defe6f01ba14d

View File

@ -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__":