I'm migrating a log4j.properties to log4j2.xml. Syslog appender in the former has a configuration
log4j.appender.SYSLOG.Header=true
What's the equivalent setting in log4j2.xml?
There is no need to do anything:
In log4j 1, setting log4j.appender.SYSLOG.Header=true resulted in the appender including the HEADER part (that is, timestamp and host name) of the syslog packet.
In log4j 2, the timestamp and host name are always included. (Looks like this cannot be switched off.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With