From 33f5e6744f57f0b578e812173160c2bc704d58be Mon Sep 17 00:00:00 2001 From: Prateek Srivastava Date: Wed, 12 Jun 2013 13:30:58 -0600 Subject: [PATCH] Filter the buggy line --- pidcat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pidcat.py b/pidcat.py index c9dd8b9..71ab7d9 100755 --- a/pidcat.py +++ b/pidcat.py @@ -108,6 +108,7 @@ PID_KILL = re.compile(r'^Killing (\d+):([a-zA-Z0-9._]+)/[^:]+: (.*)\r?$') PID_LEAVE = re.compile(r'^No longer want ([a-zA-Z0-9._]+) \(pid (\d+)\): .*\r?$') PID_DEATH = re.compile(r'^Process ([a-zA-Z0-9._]+) \(pid (\d+)\) has died.?\r$') LOG_LINE = re.compile(r'^([A-Z])/([^\(]+)\( *(\d+)\): (.*)\r?$') +BUG_LINE = re.compile(r'^(?!.*(nativeGetEnabledTags)).*$') input = os.popen('adb logcat') pids = set() @@ -141,6 +142,10 @@ while True: if len(line) == 0: break + bug_line = BUG_LINE.match(line) + if bug_line is None: + continue + log_line = LOG_LINE.match(line) if not log_line is None: level, tag, owner, message = log_line.groups()