开发者

Android: No logs while logging via slf4j-android

I use library which uses sfl4j-api for logging in android application. So I use slf4j-android to get logs, but I only got following messages:

I/AndroidLoggerFactory(  267): Logger name 'org.apache.mina.util.NamePreservingRunnable' exceeds maximum length of 23 characters, using 'o*.a*.m*.u*.NamePreser*' instead.

And no more logs from that library, but I see in code there are plenty of them. I tried to change the level of loggin开发者_开发技巧g for tags in emulator by:

emulator -avd default -debug '*'

or by

emulator -avd default -verbose

and nothing changed.

Any help will be appreciated.


I have found the answer at last. LOG.isDebugEnabled() always returns false even if LOG.debug(msg) has printed message in ddms. I have just got rid of LOG.isDebugEnabled().


I have tried original slf4j.org-android but unfortunately this jar was not able to get debug/verbose messages to be logged as explained by @kogut-s answer.

currently i link against the alternative lp0-slf4j-android implementation that uses a properties-file with the logging settings where i can also get debug/verbose messages if enabled.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜