Details
Description
Syslog (i.e RFC5424Layout) does not work with parametrized messages. If I do something like this:
logger.info("Hello {}", "World");
I get this at the syslog server:
Oct 16 18:24:33 10.0.0.3 myApp Hello {}
This is the config file I'm using:
<?xml version="1.0" encoding="UTF-8"?> <Configuration> <Appenders> <Console name="STDOUT" target="SYSTEM_OUT"> <PatternLayout pattern="%d{ISO8601}: %-5p [%t-%c{2}] - %m%n"/> </Console> <Syslog name="syslog" format="RFC5424" host="10.0.0.1" port="514" protocol="TCP" appName="myApp" facility="LOCAL0" newLine="true" includeMDC="true" id="App" reconnectionDelay="1000"/> </Appenders> <Loggers> <Root level="debug"> <AppenderRef ref="STDOUT"/> <AppenderRef ref="syslog"/> </Root> </Loggers> </Configuration>
The log to stdout is ok though.
Attached you find my patch for this bug.