log4j2 broke Syslog export

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
Blueberry
Posts: 19
Joined: Thu Jan 25, 2018 12:14 pm

log4j2 broke Syslog export

Post by Blueberry »

Hello,

Since patch 32 and the switch to log4j2, the Syslog appender as configured in log4j.properties.in does not work anymore. Here's what log4j.properties.in looks like:

# Syslog appender
appender.SYSLOG.type = Syslog
appender.SYSLOG.name = syslogAppender
appender.SYSLOG.host = localhost
appender.SYSLOG.port = 514
appender.SYSLOG.protocol = UDP
appender.SYSLOG.facility = LOCAL0
appender.SYSLOG.layout.type = PatternLayout
appender.SYSLOG.layout.pattern = mailboxd: %-5p [%t] [%z] %c{1} - %m

Syslog server does not receive anything.

The issue seems to be with the layout and/or the layout pattern (or a message format issue) as when sending zimbra.security logs, commenting last 2 lines is enough to have some logs being received on the syslog server side (but poor ones. wihtout threads, IP addresses, etc.). Note that commenting those 2 lines does not help at all with the zimbra.mailbox logs.

Has someone find the correct way to configure the export to syslog with log4j2?

Regards,
Blue.
gcakici2
Posts: 4
Joined: Mon Jan 18, 2021 9:45 pm

Re: log4j2 broke Syslog export

Post by gcakici2 »

Did you find any solution to that problem ?
Post Reply