Re: Logging PostgreSQL output - Mailing list pgsql-admin

From Gaetano Mendola
Subject Re: Logging PostgreSQL output
Date
Msg-id 40F94FDB.3030307@bigfoot.com
Whole thread Raw
In response to Logging PostgreSQL output  ("Joost Kraaijeveld" <J.Kraaijeveld@Askesis.nl>)
List pgsql-admin
Joost Kraaijeveld wrote:

> Hi all,
>
> I want to log all PostgreSQL's output in a seperate file. Is it possible to use the syslog system to do that or is
theonly way to use the stdout method? If it is possible to use the syslog system, how should I do this (I have tried
severalthings but nothing I tried worked)? 

put these lines on your postgresql.conf

syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

after this you have to configure your syslogd:

add these lines on yout syslog.conf:

# Postgres
LOCAL0.*                                      -/var/log/postgresql.log

not forget to add LOCAL0.none in your  /var/log.messages log ad
ad that "-" char in front of your file location log


now you have to SIGHUP both postgres and syslogd.




Regards
Gaetano Mendola




pgsql-admin by date:

Previous
From: Howard Bagcat
Date:
Subject: execute user-defined BKI
Next
From: Gaetano Mendola
Date:
Subject: Re: Replication in main PostgreSQL codebase