Re: Trouble with query logging

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: ppi(at)amug(dot)org
Subject: Re: Trouble with query logging
Date: 2004-09-22 08:30:09
Message-ID: 41513811.9030800@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ppi(at)amug(dot)org wrote:
> I'm having difficulty getting postgresql to log queries.
>
> I have the following set in my postgresql.conf:
>
> -------------------------------
> # - Syslog -
>
> syslog = 2 # range 0-2; 0=stdout; 1=both; 2=syslog
> syslog_facility = 'LOCAL0'
> syslog_ident = 'postgres'
>
> log_statement = yes
>
> -------------------------------
>
> I've done a:
>
> pg_ctl reload -D /usr/local/pgsql/data/
>
> and have even done a restart, but queries are not getting logged (to
> /var/log/messages).
>
> (Error messages are getting logged, however.)

You have to configure your syslogd to accept messages from
LOCAL0, usualy I add to syslogd.conf:

LOCAL0.* -/var/log/postgresql.log

don't forget to SIGHUP the syslogd

Regards
Gaetano Mendola

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2004-09-22 09:42:53 Re: gist index woes
Previous Message stig erikson 2004-09-22 07:54:01 Re: How to get most frequent and least frequent values in a column?