How can I automatically clear logcat output before each run in Android Studio?

Adam picture Adam · Jan 3, 2015 · Viewed 12.2k times · Source

I'm using Android Studio 1.0.2 and can't find the way to clear logcat output before each Run/Debug.

Is there any Gradle task (similar to adb logcat -c) that I can create a Run/Debug configuration for in order to clear output? Or is there simpler way to clear the logcat?

Answer

stkent picture stkent · Jan 3, 2015

This can be customized for each existing run configuration you have defined. Instructions for enabling this feature are given below:


Android Studio 1.4 and later

Check the checkbox located at:

Run -> Edit configurations... -> Miscellaneous tab -> "Clear log before launch"


Android Studio 1.3 and earlier

Check the checkbox located at:

Run -> Edit configurations... -> Logcat tab -> "Clear Log before launch"