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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8, 2.8.2
    • Fix Version/s: 2.9.0
    • Component/s: Appenders, Layouts
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: