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

GelfLayout/SocketAppender does document "includeNullDelimiter" to append the frame delimiter null byte when using TCP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8, 2.8.2
    • 2.9.0
    • Appenders, Layouts
    • None

    Description

      Hi,

      According to GELF specification, when using TCP protocol a '\0' null byte must be appended at the end of message as frame delimiter.
      http://docs.graylog.org/en/latest/pages/gelf.html#gelf

      Using below config messages do not appear in Graylog.
      Everything is fine when using UDP, or when using GELF appender (https://github.com/graylog-labs/log4j2-gelf), so logging config itself is ok.
      I can see the packets in Wireshark, only Graylog ignores them.

              <Socket name="SocketTcp" protocol="TCP" host="dit17mpc029.dorsum.intra" port="12201" ignoreExceptions="false">
                  <GelfLayout host="jenkins-sock-tcp" compressionType="OFF"/>
              </Socket>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lao974 Peter Lauko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: