Wednesday, November 17, 2010

Enable SYSLOG facility for Postgresql instance

0 comments
Modified values of the following parameters at postgresql.conf:
log_destination = ‘syslog’
syslog_facility = ‘LOCAL0’
silent_mode = on
Added lines at /etc/syslog.conf
LOCAL0.*              -/var/log/pgsql/pgsql.log
 Ignored PostgreSQL facility for the default log file otherwise you would log the queries twice:
*.info;...;local0.none        /var/log/messages

Restarted the SYSLOG service:
/etc/init.d/sysklogd restart
Now, we got postgresql log at /var/log/pgsql/pgsql.log 

Leave a Reply

Labels