[logback-user] logback-android problem with exception logging and logcat

Tony Trinh tony19 at gmail.com
Fri Dec 7 05:13:04 CET 2012

On Thu, Dec 6, 2012 at 10:02 AM, Duarte Silva
<duarte.silva at serializing.me>wrote:

> Hi,
> I have searched for this problem but haven't been successful in my quest
> for a
> solution. I have attached the configuration used as well as the result in
> the
> logcat output using logback and the Android Log. The logging call is the
> following (where LOGGER as been obtained by using the LoggerFactory and the
> configuration is in the application manifest):
> if (LOGGER.isWarnEnabled()) {
>     LOGGER.warn("Failed to use the mark/reset, will retrieve the data
> again",
>                     exception);
> }
> As you may notice the output is all crapped out. What am I doing wrong?
> Best regards,
> Duarte Silva

Your <tagEncoder> pattern should append "%nopex" [1] to suppress the stack

logback silently includes %xThrowable in your pattern at the end to display
the stack trace when logging a throwable [2]. This probably does not make
sense for the log tag, which is meant to be short. I've created an issue
for this [3] and will fix it for the next release.

[1] http://logback.qos.ch/manual/layouts.html#nopex
[2] http://logback.qos.ch/manual/layouts.html#xThrowable
[3] https://github.com/tony19/logback-android/issues/33
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20121206/5e016b78/attachment.html>

More information about the Logback-user mailing list