Why are Log.d() and Log.v() not printing

Matthias Ronge picture Matthias Ronge · Feb 10, 2015 · Viewed 47.1k times · Source

I have the following test code in my Activity:

@Override
public void onStart() {
    super.onStart();
    Log.e(CLASS_NAME, "ERROR onStart()");
    Log.w(CLASS_NAME, "WARN onStart()");
    Log.i(CLASS_NAME, "INFO onStart()");
    Log.d(CLASS_NAME, "DEBUG onStart()");
    Log.v(CLASS_NAME, "VERBOSE onStart()");

On the logcat view in Android Studio, it only prints:

02-10 15:56:10.190    6194-6194/org.example.my_app E/MyActivity﹕ ERROR onStart()
02-10 15:56:10.190    6194-6194/org.example.my_app W/MyActivity﹕ WARN onStart()
02-10 15:56:10.190    6194-6194/org.example.my_app I/MyActivity﹕ INFO onStart()

On top of the box, the menu is set to Log level: “Verbose”, and if I go into the menu next to it, choose “Edit filter configuration”, “by Log Level” is also set to “Verbose”. Why are the Log.d() and Log.v() not printing anything? What might I am missing? Any suggestions would be appreciated.

Answer

Yogesh Rathi picture Yogesh Rathi · Sep 22, 2016

Accepted answer not working

My solution:

when your Log.d is not working then Log.wtf is work

It's working for me, may be this is helpful to other, who find solution