18

For some reason I'm able to see messages of all levels Log.i() and above, but not the Log.d() or Log.v() levels. Haven't had much luck finding a reason for this. Anyone have any idea how to fix this?

Some further details: This is not an issue with me forgetting to select the appropriate level in the logcat dropdown in Eclipse. The log messages in question don't show up on an app I have for logcat tracking on my phone either. (debug log messages are showing up from other apps though). I am running OSX.

Catherine
  • 13,588
  • 9
  • 39
  • 60
  • 3
    This has been going on for a very long time. Restarting eclipse is not the issue. Additionally, I have an app on my phone that shows me the logcat output, and it doesn't show the Log.d() level output either. It shows it for my coworker though, so it's not an issue with the project itself--at least, shouldn't be. – Catherine Oct 25 '12 at 06:57
  • 1
    In logcat screen, there is a dropdown to indicate log levels. Select verbose in that – user936414 Oct 25 '12 at 06:58
  • @user936414 that doesn't solve the problem. – Catherine Oct 25 '12 at 07:08
  • Alternatively you can check your logcat in command line. goto your `/android-sdk-linux/platform-tools` directory and type `adb logcat`.Confirm your debug logs are showing here or not? – Juned Oct 25 '12 at 07:20
  • @juned No, not showing up there either. – Catherine Oct 25 '12 at 17:31

3 Answers3

15

Turns out I had to enable the appropriate logging level directly through ADB.

$ ./adb shell stop
$ ./adb shell setprop log.tag.MYTAG VERBOSE
$ ./adb shell start

This solved the problem. Seems like a pain to do that every time I restart my phone though.

Catherine
  • 13,588
  • 9
  • 39
  • 60
  • `./adb shell setprop log.tag.MY_APP_TAG VERBOSE` works for me. It enabled debug output for my application on Sony Xperia XA. `./adb shell stop|start` requires root and, probably, not needed. – gelin Jun 12 '20 at 07:16
  • On a Xperia XA1 I found out using `adb shell getprop` that the property `log.tag` was set to `I`. Setting it to `V` using `adb shell setprop log.tag V` worked for me. – SpaceBison Apr 01 '21 at 21:05
3

There's a way to set the appropriate logging level globally (for all apps) on Amazon Fire TV Stick. The command to enable VERBOSE level:

adb shell setprop persist.log.tag V
yuliskov
  • 1,379
  • 15
  • 16
-1

Also keep in mind, some manufacturers may restrict logging. (Eg. Huawei - Huawei, logcat not showing the log for my app?). If nothing works, try running on different mobile, or try to find a phone specific solution.

Community
  • 1
  • 1
Miklos Jakab
  • 2,024
  • 1
  • 23
  • 31