Does Log.isLoggable returns wrong values?

前端 未结 4 1116
一向
一向 2020-12-20 12:06

When I was writing a log wrapper for my android application I noticed a strange behavior of androids Log.isLoggable method. Executing following code:

final S         


        
4条回答
  •  时光取名叫无心
    2020-12-20 12:56

    You should use

    if (Log.isLoggable(TAG, Log.VERBOSE)) {
        Log.v(TAG, "verbose is active: " + Log.isLoggable(TAG, Log.VERBOSE));
    }
    

提交回复
热议问题