Colored Logcat Output |
- Download coloredlogcat.py from Jeff Sharky's blog
- Copy the script to your local ~/bin folder and make it executable
- Add ~/bin permanently to your $PATH variable. Either in your .bashrc or .zshrc (or whatever shell you use) add or modify this line:
mkdir ~/bin cp ~/Downloads/coloredl chmod +x ~/bin/coloredlogcat.py
export PATH=$HOME/bin:$PATH
You can either use it directly, by simply entering coloredlogcat.py, or you can use adb logcat with all it's parameters and just pipe it into coloredlogcat.py
Show only DEBUG output from the MyApp TAG. Everything else is SILENT: *:s (not shown)
adb -d logcat "*:S MyApp:D" | coloredlogcat.pyShow only WARNING, ERROR and FATAL output. Great for checking on exceptions.
adb -d logcat "*:W" | coloredlogcat.pyReferences
Logcat priorities
- V — Verbose (lowest priority)
- D — Debug
- I — Info
- W — Warning
- E — Error
- F — Fatal
- S — Silent (highest priority, on which nothing is ever printed)
- adb logcat -c clears the entire log
I've just launched a new side project of mine:
Bugfender - A modern remote logger tailor-made for mobile development
It's currently free and you can sign up here: https://app.bugfender.com/signup
Any kind of feedback is more than appreciated :-)
Thanks for posting. Is there windows compatible version of this script? I found it uses fcntl module (not available in Windows distribution).
ReplyDeleteThanks.
Regards,
Dragan