Re: way to turn off epochs in log_filename - Mailing list pgsql-admin

From Peter Koczan
Subject Re: way to turn off epochs in log_filename
Date
Msg-id 4544e0330710261325k708348fbm5c04eea44fd7ccc7@mail.gmail.com
Whole thread Raw
In response to way to turn off epochs in log_filename  (David Lowry <dlowry@bju.edu>)
List pgsql-admin
> The docs state that if there are no %-escapes in log_filename, then it will
> add the epoch onto the end of the log filename. Is there any way to turn off
> this behavior and just use the filename specified in log_filename? I'd like
> have all the log data written to a file like postgresql.log and let
> logrotate do the rotation.

Correct me if I'm wrong, but I think you're trying to redirect stderr.
Why not just use syslog? That's what I use and it works very nicely.

Here are the relevant bits from postgresql.conf (that aren't related
to log formatting and changed from the default).
log_destination = 'syslog'
syslog_facility = 'LOCAL1'

Just make sure you pipe the syslog facility to postgresql.log, and
then you can use logrotate.

Peter

pgsql-admin by date:

Previous
From: David Lowry
Date:
Subject: way to turn off epochs in log_filename
Next
From: Tom Lane
Date:
Subject: Re: way to turn off epochs in log_filename