Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-95

Logging EOFException differs from EOFException.printStackTrace()

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • None
    • None
    • None
    • java 1.6
      logback 0.9.18
      slf4j 1.5.11

    Description

      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:

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

      Attachments

        Activity

          People

            logback-dev Logback dev list
            cowwoc Gili
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: