Search code examples
androidadblogcat

Logcat in Android Device Monitor only display certain messages


I am not using Eclipse or Android Studio, I am just compiling my code myself and installing with adb.

If an uncaught exception or error occurs, it prints the the line number of the code that triggered it, but not the message.

If I call Log.d or Log.i, etc. , nothing happens. If I catch an exception and call e.printStackTrace() or System.err.println(), nothing happens.

What could be the issue?

Update: By the way, I am accessing logcat via the Android Device Monitor. Update: It works fine using adb logcat. I just need it to work from Android Device Monitor now.


Solution

  • Make sure you don't have any filter set.If you just use the following command you should be able to see all the logs.

    adb logcat 
    

    if you want to see only logs with particular tag:

    adb logcat -s "TAG" 
    

    Also make sure when you building the apk,you don't have any code that is disabling the logs-because its a release binary.

    If you are viewing through IDE logcat view remove the filter.It must be there left hand side corner.If the filter level is error,you need to make it verbose.