I'm running Ubuntu and Postgresql 9.
I've enabled postgresql to log to syslog, and added the following directive to the config file:
syslog_facility = 'local0'".
I've tried to configure syslog to log those to a separate file, but that filed. I updtated /etc/syslog.conf so it contains (see last line for the postgresql-directive)
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
*.emerg *
daemon.*;mail.*;\
news.err;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
local0.* -/var/log/pgsql
I've restarted syslog with "/etc/init.d/sysklogd restart" and with "restart rsyslog".
When postgresql is reloaded, the messages are appended to /var/log/messages and /var/log/syslog ... and not to the correct file as I configured syslog to use...
The same works fine on an other Debian machine with the same version of Postgresql...
any ideas?
- is something wrong with my syslog config file?
- should I add something else to my postgresql.conf?
- can I check if syslog is indeed using the config file that I changed?