Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-96

Error with SocketServer

    XMLWordPrintableJSON

Details

    Description

      Hello,

      by using your core.appender.SocketAppender and your core.netSocketServer I found a dissent.

      I am using the default setup of the appender with the SerializedLayout. The first send event to the server is properly deserialized. on the second I get an IOException:

      log4j java.io.StreamCorruptedException: invalid type code: AC

      I researched the problem and I found a solution here:
      http://stackoverflow.com/questions/2393179/streamcorruptedexception-invalid-type-code-ac

      The appender creates a new output stream for each log event. It writes every time a header. The listening server don't expect a header the second time. Because of this it crashes.

      Sincerely
      Robert Breunung

      Attachments

        Activity

          People

            rgoers Ralph Goers
            antrophos Robert Breunung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: