Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pidcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
parser.add_argument('-s', '--serial', dest='device_serial', help='Device serial number (adb -s option)')
parser.add_argument('-d', '--device', dest='use_device', action='store_true', help='Use first device for log input (adb -d option)')
parser.add_argument('-e', '--emulator', dest='use_emulator', action='store_true', help='Use first emulator for log input (adb -e option)')
parser.add_argument('-b', '--buffer', dest='alternate_buffer', nargs='+', help='Request alternate ring buffer')
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)')
Expand Down Expand Up @@ -179,6 +180,10 @@ def allocate_color(tag):
adb_command.append('logcat')
adb_command.extend(['-v', 'brief'])

if args.alternate_buffer:
for buffer in args.alternate_buffer:
adb_command.extend(['-b', buffer])

# Clear log before starting logcat
if args.clear_logcat:
adb_clear_command = list(adb_command)
Expand Down