1

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?

Phantômaxx
  • 37,352
  • 21
  • 80
  • 110
Alexei
  • 11,572
  • 19
  • 87
  • 193

0 Answers0