Android Studio 2.3.3
Here my snippet:
if (BuildConfig.DEBUG)
Log.d(TAG, "some message");
As result message "some message" show in logcat only in debug mode. In release mode this message is not show. OK. Nice.
The problem is that I need to set this check before every Log.d()
like this: if (BuildConfig.DEBUG)
Maybe has another solution? Without check before Log.d()
? Maybe gradle has some settings for this?