Merge pull request #67 from brennantaylor/print_if_no_pids

Print line if we have not seen any pids created yet
This commit is contained in:
Jake Wharton
2014-08-06 14:36:52 -07:00
+3 -1
View File
@@ -176,6 +176,7 @@ if sys.stdin.isatty():
else: else:
adb = FakeStdinProcess() adb = FakeStdinProcess()
pids = set() pids = set()
seen_pids = False
last_tag = None last_tag = None
app_pid = None app_pid = None
@@ -234,6 +235,7 @@ while adb.poll() is None:
if match_packages(line_package): if match_packages(line_package):
pids.add(line_pid) pids.add(line_pid)
seen_pids = True
app_pid = line_pid app_pid = line_pid
@@ -263,7 +265,7 @@ while adb.poll() is None:
message = message.lstrip() message = message.lstrip()
owner = app_pid owner = app_pid
if owner not in pids: if seen_pids and owner not in pids:
continue continue
if level in LOG_LEVELS_MAP and LOG_LEVELS_MAP[level] < min_level: if level in LOG_LEVELS_MAP and LOG_LEVELS_MAP[level] < min_level:
continue continue