This is my blog where I hope to post information about what I am doing technically and what my family is up to. I hope you enjoy

Monday, May 24, 2010

Formatting LogCat Output

The output from an Android Logcat application can be quite difficult to determine problems especially without being in debug your application.   Logcat is a great way to view the logs.  I found a really nice python script that enables one to format the Logcat log so that the log types DEBUG, WARN, INFO, etc are colored making it easier to view.

Here is the output of such a log after piping the logcat to the python script;
This is a terminal output of the Logcat log.  I captured this while running my Android application in debug mode within Eclipse.  This log is much easier to read than the logcat that is within Eclipse.

How did I do this?   execute the following on the terminal command line.
adb logcat |  ~/tools/scripts/coloredlogcat.py

The coloredlogcat.py is a python script I got from colored.   I stole this script from Jeff Sharkey, thanks Jeff.

No comments:

Post a Comment

Layout-->Edit HTML -->