[syslog-ng] Proper formatting of incoming Log4j, Jetty events

Fabien Wernli wernli at in2p3.fr
Wed Dec 16 16:39:57 CET 2015


Hi Clayton,

If it's possible for you to switch to log4j2, my suggestion would be to use
RFC5424 instead, which allows for structured logging.

Example log4j2.xml config:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
  <Appenders>
    <Syslog name="RFC5424" format="RFC5424" host="cc-ecole2015-log.in2p3.fr" port="514"
      protocol="UDP" appName="MyApp" includeMDC="true" mdcId="mdc"
      facility="LOCAL5" enterpriseNumber="41262" newLine="true"
      messageId="Audit" id="App"/>
  </Appenders>
  <Loggers>
    <Root level="info">
      <AppenderRef ref="RFC5424"/>
    </Root>
  </Loggers>
</Configuration>



More information about the syslog-ng mailing list