Modified values of the following parameters at postgresql.conf:
Restarted the SYSLOG service:
Continue reading →
log_destination = ‘syslog’Added lines at /etc/syslog.conf
syslog_facility = ‘LOCAL0’
silent_mode = on
LOCAL0.* -/var/log/pgsql/pgsql.logIgnored PostgreSQL facility for the default log file otherwise you would log the queries twice:
*.info;...;local0.none /var/log/messages
Restarted the SYSLOG service:
Now, we got postgresql log at /var/log/pgsql/pgsql.log/etc/init.d/sysklogd restart