i have the following issue programming an android application with android studio. When I use Log.d(...)
in the code, no logging output is generated while all other logging functions, e.g. Log.i(...)
, work in exactly the same position.
Example that does not work:
@Override
protected void onStart() {
super.onStart();
Log.d("MainActivity", "onStart called.");
}
But this works:
@Override
protected void onStart() {
super.onStart();
Log.i("MainActivity", "onStart called.");
}
The Logcat level is set to Debug, the correct device and application are chosen, and as filter I use the Tag "MainActivity". I have already tried to restart logcat, clear the log, nothing successful.
I have also that the logging level with adb shell setprop log.tag.MainActivity DEBUG
so that Log.isLoggable("MainActivity", Log.DEBUG)
returns true.
The App is also set to debuggable.
I am very thankful for any hint.
EDIT:
I seems to be an issue with my phone (Honor8). Although it hasn't worked in the emulator as well, executing adb shell setprop log.tag.MainActivity DEBUG
fixes the problem at least in the emulator.