[rsyslog] log *.*, except logs by "postgres"

david at lang.hm david at lang.hm
Fri Mar 19 00:08:29 CET 2010


On Fri, 19 Mar 2010, Tomasz Chmielewski wrote:

> Am 18.03.2010 23:54, david at lang.hm wrote:
>
>>> Postgres adds such entries through syslog:
>>>
>>> Mar 19 04:14:16 sun postgres[388]: [261-1] 2010-03-19 04:14:16 SGT LOG:  duration: 0.037 ms  statement: ROLLBACK
>>
>> you could add
>>
>> :programname, :isequal, "postgres" ~
>>
>> ahead of your line to go to /var/log/syslog so that anything with the
>> programname of postgres gets dropped first
>
> Meaning, like this:
>
> :programname, :isequal, "postgres" ~ *.*;auth,authpriv.none	-/var/log/syslog

no,

:programname, :isequal, "postgres" ~
*.*;auth,authpriv.none	-/var/log/syslog

each of these is a seperate statement. the ~ as a destination tells 
rsyslog not to proceed further through the rules for this log entry.

David Lang



More information about the rsyslog mailing list