I use slf4j-android 1.6.1-RC1 via gradle / maven and when I call Log.debug nothing appears in Logcat under Android Studio 0.3.5 when I run the application in the emulator.
Just for fun, I tried the following:
private final Logger Log = LoggerFactory.getLogger(MainActivity.class); ... Log.debug("Got this far, woohoo!"); android.util.Log.d("blah","I am here!");
Log.d output appeared in Logcat, but Log.debug did not.
I checked Log.isDebugEnabled () and I'm sure it is set to false. But this seems odd since android.util.Log.d works just fine. Should slf4j use the same log level? Actually, shouldn't slf4j just call android.util.Log under the covers?
I also replaced Log.debug with Log.error and it worked. So the problem is that slf4j somehow decided that debugging events should not be issued, even if Log.d throws them out.
How do I get slf4j to honor the log level set in Logcat in Android Studio, e.g. android.util.Log?
source share