[logback-dev] [JIRA] Created: (LBCORE-142) Logging EOFException differs from EOFException.printStackTrace()

Gili (JIRA) noreply-jira at qos.ch
Tue Mar 9 00:32:16 CET 2010


Logging EOFException differs from EOFException.printStackTrace()
----------------------------------------------------------------

                 Key: LBCORE-142
                 URL: http://jira.qos.ch/browse/LBCORE-142
             Project: logback-core
          Issue Type: Bug
         Environment: java 1.6
logback 0.9.18
slf4j 1.5.11
            Reporter: Gili
            Assignee: Logback dev list
            Priority: Minor


Given: e = EOFException, if I run e.printStackTrace() I get:

java.io.EOFException
        at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
        at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)

When I log this same exception under Logback I get:

java.io.EOFException: null
        at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281) [na:1.6.0_18]
        at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750) [na:1.6.0_18]
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780) [na:1.6.0_18]
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280) [na:1.6.0_18]

I see two problems with the logback version:

# It prints "null" after EOFException when an exception message is not set. I am expecting the same output as printStackTrace()
# It is missing debugging information (file and line numbers) as seen in printStackTrace()

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list