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

SyslogAppender with RFC5424 and TLS is prepending messagelength

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Not A Problem
    • Affects Version/s: 2.11.1
    • Fix Version/s: None
    • Component/s: Core, Layouts
    • Labels:
      None
    • Environment:

      Linux

      Description

      If I want to log via Syslog (RFC5424) the logs seem to have the length of the message in front of the message which results in parser errors at the syslogserver.

      config:
      <?xml version="1.0" encoding="UTF-8"?>
      {{ <Configuration status="INFO">}}
       <Appenders>
        <Syslog name="local" host="localhost" port="10001" format="RFC5424" newLine="true" id="App" mdcId="9999">
         <SSL>
          <TrustStore location="trust.jks" password="testtest" />
         </SSL>
        </Syslog>
       </Appenders>
       <Loggers>
        <Root level="debug">
         <AppenderRef ref="local"/>
        </Root>
       </Loggers>
      {{ </Configuration> }}

      Result (with openssl s_server -key private.pem -cert public.pem -accept 10001):

      67 <134>1 2019-01-14T13:26:14.947+01:00 apu localhorst 12866 - - Test

      Expected result:

      <134>1 2019-01-14T13:26:14.947+01:00 apu localhorst 12866 - - Test

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                AZMax Maximilian
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Time Spent - 50m Remaining Estimate - 10m
                  10m
                  Logged:
                  Time Spent - 50m Remaining Estimate - 10m
                  50m