How do I enable/disable log levels in Android?

后端 未结 18 2162
无人共我
无人共我 2020-11-22 16:42

I am having lots of logging statements to debug for example.

Log.v(TAG, \"Message here\");
Log.w(TAG, \" WARNING HERE\");

while deploying t

18条回答
  •  無奈伤痛
    2020-11-22 17:30

    You should use

        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "my log message");
        }
    

提交回复
热议问题