Turning on/off the logfile

Started by Gerald Gutierrezalmost 25 years ago2 messagesgeneral
Jump to latest
#1Gerald Gutierrez
pozix@home.com

PostgreSQL spits out logging information to stdout and stderr which can
then be piped to a file to act as a "log file". Is there a way to get
PostgreSQL to enable/disable this output without restarting the server?
Currently I have to edit /etc/rc.d/init.d/postgresql to run postgresql
with >mylogfile or >/dev/null, and restart the server.

If there isn't an ability to do this, I think I'll whip up a little script
that will read stderr/stdin but listen to signals and turn the output on or
off.

Thanks.

Gerald.

#2Andrew Sullivan
andrew@libertyrms.com
In reply to: Gerald Gutierrez (#1)
Re: Turning on/off the logfile

On Fri, Jun 01, 2001 at 08:24:32PM -0700, Gerald Gutierrez wrote:

If there isn't an ability to do this, I think I'll whip up a little script
that will read stderr/stdin but listen to signals and turn the output on or
off.

I think you can't turn this on & off on the fly, but I uncovered a
little program the other day which might work (I haven't tried it
yet), called flog. See <http://oss.ezic.com/&gt;.

-- 
----
Andrew Sullivan                               87 Mowat Avenue 
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.com>                               M6K 3E3
                                         +1 416 646 3306 x110