filter_log_message: use rlogs if available

pull/21316/head
Willem Melching 4 years ago
parent 8ed08af48d
commit 08c1fa32c7
  1. 9
      selfdrive/debug/filter_log_message.py

@ -35,7 +35,12 @@ def print_logmessage(t, msg, min_level):
def print_androidlog(t, msg):
source = ANDROID_LOG_SOURCE[msg.id]
print(f"[{t / 1e9:.6f}] {source} {msg.pid} {msg.tag} - {msg.message}")
try:
m = json.loads(msg.message)['MESSAGE']
except Exception:
m = msg.message
print(f"[{t / 1e9:.6f}] {source} {msg.pid} {msg.tag} - {m}")
if __name__ == "__main__":
@ -49,7 +54,7 @@ if __name__ == "__main__":
logs = None
if len(args.route):
r = Route(args.route[0])
logs = r.qlog_paths()
logs = [q if r is None else r for (q, r) in zip(r.qlog_paths(), r.log_paths())]
if len(args.route) == 2 and logs:
n = int(args.route[1])

Loading…
Cancel
Save