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
parent
1a6881edc6
commit
45280754d6
2
cereal
2
cereal
|
@ -1 +1 @@
|
||||||
Subproject commit 70aeecf0930376a9da236b6f274941488e593063
|
Subproject commit 42542ee96ca00744e6117d57533defe6f01ba14d
|
|
@ -17,7 +17,8 @@ def main() -> NoReturn:
|
||||||
sock.bind("ipc:///tmp/logmessage")
|
sock.bind("ipc:///tmp/logmessage")
|
||||||
|
|
||||||
# and we publish them
|
# 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:
|
while True:
|
||||||
dat = b''.join(sock.recv_multipart())
|
dat = b''.join(sock.recv_multipart())
|
||||||
|
@ -29,7 +30,12 @@ def main() -> NoReturn:
|
||||||
# then we publish them
|
# then we publish them
|
||||||
msg = messaging.new_message()
|
msg = messaging.new_message()
|
||||||
msg.logMessage = record
|
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__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue