Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 2 KB

README.md

File metadata and controls

43 lines (36 loc) · 2 KB

ColoredLogcat

Takes the adb logcat output (from a file or ADB device) and improves its readability by formatting and coloring it.

Features

  • Works on Linux and Windows
  • Supports piping (example: cat log.txt | ./coloredlogcat.py)
  • Supports all ADB logcat formats (brief, long, process, tag, thread, threadtime, and time)
  • Can write the log to a file in addition to printing it on the terminal
  • Filter by PID, priority, process tag and message.
  • Advanced filtering. See filter_file_example

Images

Unfiltered output

Unfiltered output

Usage

usage: coloredlogcat.py [-h] [-f FILE] [-F FILTER_FILE] [-p PRIORITY] [-P PID] [-t TAG] [-T TAG_S] [-m MESSAGE] [-M MESSAGE_S] [-v FORMAT]

options:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Write raw and unfiltered log to file.
  -F FILTER_FILE, --filter-file FILTER_FILE
                        Load filters from file. See filter_file_example for more info.
  -p PRIORITY, --priority PRIORITY
                        Filter by priority. Example: -p WEF
  -P PID, --pid PID     Filter by PID(s). Example: -P 4713,6452
  -t TAG, --tag TAG     Filter by process tag (case insensitive). Regex supported. Example: -t "^(system|androidruntime)$"
  -T TAG_S, --tag-s TAG_S
                        Filter by process tag (case sensitive). Regex supported. Example: -t "^(System|AndroidRuntime)$"
  -m MESSAGE, --message MESSAGE
                        Filter by message (case insensitive). Regex supported. Example: -m "sending signal \d to.*"
  -M MESSAGE_S, --message-s MESSAGE_S
                        Filter by message (case sensitive). Regex supported. Example: -m "Sending signal \d to.*"

ADB options:
  -v FORMAT, --format FORMAT
                        Changes the format of ADB's output. Supported formats: brief, long, process, tag, thread, threadtime, time. Default and recommended format is "time".

License

ColoredLogcat is available under the Apache 2.0 License.