X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BFDAFD1B443 for ; Wed, 21 Jul 2004 00:15:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 68983-09 for ; Wed, 21 Jul 2004 03:15:43 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id EF168D1B381 for ; Wed, 21 Jul 2004 00:15:41 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i6L3FRqv068237 for ; Wed, 21 Jul 2004 03:15:38 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i6L2lWI5058709 for pgsql-admin@postgresql.org; Wed, 21 Jul 2004 02:47:32 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Logging PostgreSQL output Date: Sat, 17 Jul 2004 18:12:11 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 33 Message-ID: <40F94FDB.3030307@bigfoot.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@pyrenet.fr To: Joost Kraaijeveld User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en In-Reply-To: X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/229 X-Sequence-Number: 14297 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