2

My app uses both Log.d and Log.i to display messages in LogCat. The .i messages work fine, but .d messages don't show up. Why? And can I do anything about it?

Note: this has nothing to do with setting Verbosity level in Android Studio. The phone or something else in the pipeline is specifically preventing .d messages from going through.

This thread indicates that at least some Huawei phones disable logging for performance reasons. But that's apparently ALL logging, not just .d?

Community
  • 1
  • 1
Bungles
  • 1,969
  • 2
  • 25
  • 54
  • Did you try to read the logcat directly from your PC's command line? – TDG Nov 11 '16 at 18:29
  • Have you enabled debug logging on the phone itself? See https://developer.android.com/reference/android/util/Log.html#isLoggable(java.lang.String, int). Whenever I start using a new device for development I inevitably have to run `adb shell setprop log.tag. DEBUG` in order to be able to view debug logs in Android Studio. Remember, the logging level you set in Android Studio simply filters the data it gets from the device, which has its own logging level. Your application must also have debug enabled (see your gradle build config). – clownba0t Nov 11 '16 at 18:38
  • Under developer options there is an item called "Logger buffer sizes" and it's set to 256k per log level. But I don't see any option specifically related to LogCat. – Bungles Nov 11 '16 at 19:03
  • TDG - I'm not seeing Log.d messages via "adb logcat" either. – Bungles Nov 11 '16 at 19:38
  • Using "adb shell setprop log.tag. DEBUG" did the trick, but that goes away when the device is rebooted correct? Is there something I can place in my manifest or something that will make this automatic? – Bungles Nov 11 '16 at 20:14
  • I tried calling "System.setProperty("log.tag.MY_TAG", "DEBUG");" from my own code, but that didn't do anything. – Bungles Nov 11 '16 at 20:44

0 Answers0