Skip site navigation (1) Skip section navigation (2)

Re: Trouble with query logging

From: Boris Folgmann <boris(at)folgmann(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Trouble with query logging
Date: 2004-09-22 16:00:10
Message-ID: cis7iu$tbu$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-general
ppi(at)amug(dot)org wrote:

> syslog_facility = 'LOCAL0' 

This is the point! You have to tell syslogd to log messages sent to this
facility. I prefer to log it to a different file than /var/log/messages.

As root do:

mkdir /var/log/postgresql/

Add something like

# postgresql
local0.*                          /var/log/postgresql/postgresql.log

to the end of your /etc/syslog.conf and do a

service syslogd reload

Make sure to add /var/log/postgresql/postgresql.log to the first line of
/etc/logrotate.d/syslog which is basically the list of syslog logfiles that
have to be regularly rotated .

On production servers with heavy load place use "-/var/log/postgr..." in
syslog.conf for a better performance. The - means  to uses buffered I/O.

In response to

pgsql-general by date

Next:From: Owens, SteveDate: 2004-09-22 16:54:52
Subject: Any way to stop PostgreSQL from using Unix domain sockets?
Previous:From: Boris FolgmannDate: 2004-09-22 15:50:02
Subject: What lock to use?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group