Re: Trouble with query logging - Mailing list pgsql-general

From Gaetano Mendola
Subject Re: Trouble with query logging
Date
Msg-id 41513811.9030800@bigfoot.com
Whole thread Raw
In response to Trouble with query logging  (ppi@amug.org)
List pgsql-general
ppi@amug.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



pgsql-general by date:

Previous
From: dom@happygiraffe.net (Dominic Mitchell)
Date:
Subject: Re: using database for queuing operations?
Next
From: Oleg Bartunov
Date:
Subject: Re: gist index woes