pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
Subject: Re: Logging PostgreSQL output
Date: Sat, 17 Jul 2004 18:12:11 +0200
Message-ID: <40F94FDB.3030307@bigfoot.com> (raw)
In-Reply-To: <A3D1526C98B7C1409A687E0943EAC41001EA47@obelix.askesis.nl>
References: <A3D1526C98B7C1409A687E0943EAC41001EA47@obelix.askesis.nl>

Joost Kraaijeveld wrote:

> Hi all,
> 
> I want to log all PostgreSQL's output in a seperate file. Is it possible to use the syslog system to do that or is the only way to use the stdout method? If it is possible to use the syslog system, how should I do this (I have tried several things but nothing I tried worked)?

put these lines on your postgresql.conf

syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

after this you have to configure your syslogd:

add these lines on yout syslog.conf:

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

not forget to add LOCAL0.none in your  /var/log.messages log ad
ad that "-" char in front of your file location log


now you have to SIGHUP both postgres and syslogd.




Regards
Gaetano Mendola






view thread (4+ messages)  latest in thread

Message-ID: <40F94FDB.3030307@bigfoot.com>
Permalink:  ../40F94FDB.3030307@bigfoot.com/
Also on:    postgresql.org/message-id/40F94FDB.3030307@bigfoot.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mendola@bigfoot.com, J.Kraaijeveld@Askesis.nl
  Subject: Re: Logging PostgreSQL output
  In-Reply-To: <40F94FDB.3030307@bigfoot.com>
  References: <A3D1526C98B7C1409A687E0943EAC41001EA47@obelix.askesis.nl> <40F94FDB.3030307@bigfoot.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox