dvl@
Developer
This seems to be a recurring issue. I managed to get PostgreSQL logging to both /var/log/messages and /var/log/postgresql. I want only the latter. I'm using FreeBSD 9.2-RELEASE-p4.
Here are some of the entries from /etc/syslog.conf:
From /usr/local/pgsql/data//postgresql.conf:
I suspect that the entries in /var/log/messages are picked up from the local0 facility, which is the default on PostgreSQL.
Reading syslog.conf(5), and trying many options, I settled upon this in /etc/syslog.conf.
NOTE the local0.none entry.
This seems to have the desired effect.
This entry in /etc/newsyslog.conf allows the log file to be rotated and signals the PostgreSQL daemon that it has been done:
Any suggestions for a different/better approach?
Here are some of the entries from /etc/syslog.conf:
Code:
!postgres
*.* /var/log/postgresql
From /usr/local/pgsql/data//postgresql.conf:
Code:
log_destination = 'syslog'
I suspect that the entries in /var/log/messages are picked up from the local0 facility, which is the default on PostgreSQL.
Reading syslog.conf(5), and trying many options, I settled upon this in /etc/syslog.conf.
Code:
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err;local0.none /var/log/messages
!postgres
*.* /var/log/postgresql
NOTE the local0.none entry.
This seems to have the desired effect.
This entry in /etc/newsyslog.conf allows the log file to be rotated and signals the PostgreSQL daemon that it has been done:
Code:
/var/log/postgresql pgsql:pgsql 640 7 * $D0 GB /usr/local/pgsql/data/postmaster.pid 30
Any suggestions for a different/better approach?