How do you usually Tag log entries? (android)

后端 未结 13 1592
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-22 21:54

I assume most of you are aware of android.util.Log All logging methods accept \'String tag\' as a first argument.

And my question is How do you usually tag y

13条回答
  •  感动是毒
    2020-12-22 22:05

    I use a TAG, but I initialise it like this:

    private static final String TAG = MyActivity.class.getName();
    

    This way when I refactor my code the tag will also change accordingly.

提交回复
热议问题