Add ignore tag switch. Useful when inspecting the full log on over flooded log devices

This commit is contained in:
laramaki
2015-01-19 19:26:46 -02:00
parent 4c79363e5a
commit fd999b79f7
+3
View File
@@ -40,6 +40,7 @@ parser.add_argument('-d', '--device', dest='use_device', action='store_true', he
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()]
@@ -278,6 +279,8 @@ while adb.poll() is None:
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