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

Parameter of mdcId in SyslogAppender has no default value.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0
    • Appenders
    • 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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ggregory Gary D. Gregory
            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

                Slack

                  Issue deployment