How do I enable/disable log levels in Android?

后端 未结 18 2206
无人共我
无人共我 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:26

    The better way is to use SLF4J API + some of its implementation.

    For Android applications you can use the following:

    1. Android Logger is the lightweight but easy-to-configure SLF4J implementation (< 50 Kb).
    2. LOGBack is the most powerful and optimized implementation but its size is about 1 Mb.
    3. Any other by your taste: slf4j-android, slf4android.

提交回复
热议问题