Re: way to turn off epochs in log_filename

Поиск
Список
Период
Сортировка
От Peter Koczan
Тема Re: way to turn off epochs in log_filename
Дата
Msg-id 4544e0330710261325k708348fbm5c04eea44fd7ccc7@mail.gmail.com
обсуждение исходный текст
Ответ на way to turn off epochs in log_filename  (David Lowry <dlowry@bju.edu>)
Список 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 по дате отправления:

Предыдущее
От: David Lowry
Дата:
Сообщение: way to turn off epochs in log_filename
Следующее
От: Tom Lane
Дата:
Сообщение: Re: way to turn off epochs in log_filename