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

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Tue Mar 9 08:53:16 CET 2010


    [ http://jira.qos.ch/browse/LBCORE-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11603#action_11603 ] 

Ceki Gulcu commented on LBCORE-142:
-----------------------------------

The content between the square brackets consists of packaging information. For example, you were runnig JDK 1.6.018. If you look carefully, the stack trace printed by logback contains the same debugging information. So your comment about missing debugging information is incorrect. You were probably unaware of loback's packaging information feature. See the documentation on the %xException conversion word in http://logback.qos.ch/manual/layouts.html#conversionWord.

> 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