mirror of
https://github.com/imcarlost/pidcat-repl.git
synced 2026-08-08 23:17:43 -04:00
Filter the buggy line
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user