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

Duarte Silva duarte.silva at serializing.me
Thu Dec 6 17:02:12 CET 2012


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
-------------- next part --------------
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStreaFailed to use the mark/reset, will retrieve the data againjava.io.IOException: Mark has been invalidated.
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.io.BufferedInputStream.reset(BufferedInputStream.java:371) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at com.test.common.asynchronous.RetrieveBaseTask.doInBackground(RetrieveBaseTask.java:186) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at com.test.common.asynchronous.RetrieveBaseTask.doInBackground(RetrieveBaseTask.java:1) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at android.os.AsyncTask$2.call(AsyncTask.java:185) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.FutureTask.run(FutureTask.java:138) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.lang.Thread.run(Thread.java:1019) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStreaFailed to use the mark/reset, will retrieve the data againjava.io.IOException: Mark has been invalidated.
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.io.BufferedInputStream.reset(BufferedInputStream.java:371) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at com.test.common.asynchronous.RetrieveBaseTask.doInBackground(RetrieveBaseTask.java:186) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at com.test.common.asynchronous.RetrieveBaseTask.doInBackground(RetrieveBaseTask.java:1) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at android.os.AsyncTask$2.call(AsyncTask.java:185) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.FutureTask.run(FutureTask.java:138) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) ~[na:0.0]
W/TEST.RetrieveBaseTaskjava.io.IOException: Mark has been invalidated.
        at java.io.BufferedInputStream.reset(BufferedInputStrea at java.lang.Thread.run(Thread.java:1019) ~[na:0.0]
-------------- next part --------------
        <configuration>
            <appender name="LOGCAT" class="ch.qos.logback.classic.android.LogcatAppender" >
                <tagEncoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
                    <pattern>TEST.%logger{0}</pattern>
                </tagEncoder>

                <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
                    <pattern>%msg</pattern>
                </encoder>
            </appender>

            <root level="DEBUG" >
                <appender-ref ref="LOGCAT" />
            </root>
        </configuration>
-------------- next part --------------
W/TEST    ( 5603): Failed to use the mark/reset, will retrieve the data again
W/TEST    ( 5603): java.io.IOException: Mark has been invalidated.
W/TEST    ( 5603):      at java.io.BufferedInputStream.reset(BufferedInputStream.java:371)
W/TEST    ( 5603):      at com.inovaworks.ppg.common.asynchronous.RetrieveBaseTask.doInBackground(RetrieveBaseTask.java:188)
W/TEST    ( 5603):      at com.inovaworks.ppg.common.asynchronous.RetrieveBaseTask.doInBackground(RetrieveBaseTask.java:1)
W/TEST    ( 5603):      at android.os.AsyncTask$2.call(AsyncTask.java:185)
W/TEST    ( 5603):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
W/TEST    ( 5603):      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
W/TEST    ( 5603):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
W/TEST    ( 5603):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
W/TEST    ( 5603):      at java.lang.Thread.run(Thread.java:1019)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4072 bytes
Desc: not available
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20121206/1360c2fc/attachment.p7s>


More information about the Logback-user mailing list