Buy @ Amazon

Search This Blog

July 5, 2017

Colorful Android Logs for Better Productivity

This post assumes you're using Android Studio, if not you better do ;)

It's very common to keep an eye on the logs in Android Studio, every time we deploy the app-under-development into a device/emulator. And it hurts our eyes and our peace for the increased attention we tend to keep on the rolling logs in the Android Studio hunting for the required pieces of information.

Is there a better way to be a little productive so that you can quickly focus on required logs? There is. By simply color styling your logs based on the log's severity level.

This way, you don't miss on that error log or important debug log amongst the continuously rolling logs since your app is deployed.

The good news is, it's a simple configuration change that you'll have to make in your Android Studio Editor like below and you're done.

Android Studio Preferences -> Search for 'logcat' in the search bar



Define your own color coding for different log severity levels or alternatively feel free to use the one that I ended up copying from.

Assert: 9C27B0
Debug: 2196F3
Error: F44336
Info: 4CAF50
Warning: FFC107

Confession: I've shamelessly copied this technique from one of the StackOverflow answers.

Book Recommendation: If you're a beginner Android developer, don't miss out in grabbing a copy of Android Programming: The Big Nerd Ranch Guide. The authors have done justice in teaching stuff with care wearing the hat of a beginner Android developer. It's worth your time. Happy learning!