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

Re: Logging PostgreSQL output

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Subject: Re: Logging PostgreSQL output
Date: 2004-07-17 16:12:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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.

Gaetano Mendola

In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2004-07-17 16:20:31
Subject: Re: Logging PostgreSQL output
Previous:From: Joost KraaijeveldDate: 2004-07-17 15:25:26
Subject: Logging PostgreSQL output

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