开发者

Android - set default log level to DEBUG

I am working on Android 3.0. I have a service that is started on boot and I have some debug logging in it.

The problem is that I can't see the logs in the LogCat since the default log level is INFO after boot. Sometimes after boot when I run from shell 'getprop log.tag.MyTag' I get an empty line. Can't figure why.

I know that sometimes Android show debug logs even if it is set to INFO, but I have a check before each log print of the if the log level is enabled.

How can I change the default log level of a pro开发者_开发技巧ject?


Try this if you're doing it from the command line:

adb logcat *:D

If you're in Eclipse, the filters are in the upper right corner of the LogCat view.

In AndroidManifest.xml:

<application ... android:debuggable="true">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜