Skip to content

Commit

Permalink
Merge pull request JakeWharton#81 from laramaki/master
Browse files Browse the repository at this point in the history
Added ignore tag switch
  • Loading branch information
JakeWharton committed Jan 20, 2015
2 parents 4c79363 + fd999b7 commit 00ebabb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pidcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
parser.add_argument('-e', '--emulator', dest='use_emulator', action='store_true', help='Use first emulator for log input (adb -e option).')
parser.add_argument('-c', '--clear', dest='clear_logcat', action='store_true', help='Clear the entire log before running.')
parser.add_argument('-t', '--tag', dest='tag', action='append', help='Filter output by specified tag(s)')
parser.add_argument('-i', '--ignore-tag', dest='ignored_tag', action='append', help='Filter output by ignoring specified tag(s)')

args = parser.parse_args()
min_level = LOG_LEVELS_MAP[args.min_level.upper()]
Expand Down Expand Up @@ -278,6 +279,8 @@ def parse_start_proc(line):
continue
if level in LOG_LEVELS_MAP and LOG_LEVELS_MAP[level] < min_level:
continue
if args.ignored_tag and tag.strip() in args.ignored_tag:
continue
if args.tag and tag.strip() not in args.tag:
continue

Expand Down

0 comments on commit 00ebabb

Please sign in to comment.