You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Alex O'Ree <al...@apache.org> on 2019/05/01 22:58:36 UTC

syslog appender and the structured data elements

So i'm digging deep into syslog and trying to get log4j2's syslog appender
to send structured data elements, such as the mdcid, id and
enterpriseNumber with logging messages and I have been unable to get it to
be sent. Is there some kind of setting that's not obvious from the docs in
order to enable this? My xml config is similar to the following


<Configuration status="trace">
<Appenders>
<Syslog name="rfc5424" format="RFC5424" host="localhost" port="514"
protocol="UDP" mdcId="mcd" enterpriseNumber="18060"
includeMDC="true" newLine="true" messageId="Audit" id="user@domain.com" />
</Appenders>
<Loggers>
<Root level="info"><AppenderRef ref="rfc5424"/></Root>
</Loggers>
</Configuration>