[syslog-ng] prevent duplicate messages in logs

Sergey Naumov sknaumov at gmail.com
Mon Jul 23 08:17:48 CEST 2012


Hello.

I would like to ask what mechanism syslog-ng provides to prevent
duplicate messages in a log. In most common scenarios I can use
"final" flag, for example, when I want only logging on a local machine
(so when I have a single destination). But imagine, that user can
specify any combination of facilities/priorities and destinations, for
example, user want to log auth/>=info and all/>=notice to local
machine and auth/>=debug to remote. Then I have a problem: I can't use
"final" flag for these entries, because some messages (say
auth/>=info) will not be logged to remote host, but only auth/debug,
and if I don't use final flag, there will be duplicates of all
auth/>=notice messages in the local log. Is there a way to solve this
problem in general?
One way is to make a separate log entry for each facility/priority
combination and group all destinations there, but it won't work if
user specify some additional custom filters.

Thanks in advance,
Sergey Naumov.


More information about the syslog-ng mailing list