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

david at lang.hm david at lang.hm
Fri Mar 19 01:08:11 CET 2010


On Fri, 19 Mar 2010, Tomasz Chmielewski wrote:

> Am 19.03.2010 00:52, david at lang.hm wrote:
>
>>> OK, with ' it started to log again, but still postgres gets to both
>>> /var/log/syslog and /var/log/postgresql/postgresql_log.
>>>
>>> So, not as expected.
>>
>> what does the raw log message look like again?
>
> Like these ones:
>
> Mar 19 07:47:32 db10 postgres[4539]: [87-1] 2010-03-19 07:47:32 SGT LOG:  duration: 0.234 ms  statement: COMMIT
> Mar 19 07:47:32 db10 postgres[4539]: [88-1] 2010-03-19 07:47:32 SGT LOG:  duration: 0.042 ms  statement: BEGIN; SET TRANSACTION ISOLATION LEVEL READ
>
>
> where postgres[number] can differ.

hmm, in these cases postgres should be what's in programname

taking a different slant, IIRC you used local0.* to capture the postgres 
logs into one file, if in the line after that you do

local0.* ~

that should eliminate those logs from going into any files after that.

David Lang



More information about the rsyslog mailing list