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.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.