开发者

How to filter logging (using LOCAL_LOGV)

In the google style guidelines at http://source.android.com/source/code-s开发者_StackOverflow中文版tyle.html#log-sparingly, you are told to wrap verbose/debug log statements in if (LOCAL_LOGV) / if (LOCAL_LOGD). I don't quite understand where LOCAL_LOG[D|V] is supposed to be defined, and exactly why this would filter out the log statements when creating a release build.

I can't seem to find the documentation describing this, can anyone help?


This answer here gives some good detail on the topic. It seems to be a difficultly for lots of people at the moment.

How do I enable/disable log levels in Android?


While the Log-Class has methods for any kind of log (error or just a debug), all that was meant by this is that you should use the correct method for what you want to log: http://developer.android.com/reference/android/util/Log.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜