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

Parameter of mdcId in SyslogAppender has no default value.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0
    • Component/s: Appenders
    • Labels:
      None

      Description

      I don't need MDC information, but must setting mdcId. if not set mdcId, throw a IllegalArgumentException;

      Configruation
      <Syslog name="RFC5424" charset="UTF-8" format="RFC5424" host="192.168.65.181" port="13514" protocol="UDP"
                      appName="testApp" includeMDC="false" facility="USER"
                      newline="true" messageId="Audit" "/>
      
      exception info
      Caused by: java.lang.IllegalArgumentException: No structured id name was supplied
      	at org.apache.logging.log4j.message.StructuredDataId.<init>(StructuredDataId.java:92)
      	at org.apache.logging.log4j.core.layout.Rfc5424Layout.<init>(Rfc5424Layout.java:139)
      	at org.apache.logging.log4j.core.layout.Rfc5424Layout.createLayout(Rfc5424Layout.java:657)
      	at org.apache.logging.log4j.core.appender.SyslogAppender.createAppender(SyslogAppender.java:133)
      	... 25 more
      

        Attachments

          Activity

            People

            • Assignee:
              garydgregory Gary Gregory
              Reporter:
              angus.aqlu angus.aqlu
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified