| From: | "Peter Koczan" <pjkoczan(at)gmail(dot)com> |
|---|---|
| To: | "David Lowry" <dlowry(at)bju(dot)edu> |
| Cc: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: way to turn off epochs in log_filename |
| Date: | 2007-10-26 20:25:26 |
| Message-ID: | 4544e0330710261325k708348fbm5c04eea44fd7ccc7@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-10-26 21:33:15 | Re: way to turn off epochs in log_filename |
| Previous Message | David Lowry | 2007-10-26 18:10:58 | way to turn off epochs in log_filename |