From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Custom timestamp format in logs |
Date: | 2014-12-14 17:50:45 |
Message-ID: | 20141214175045.GI1768@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > On Sat, Dec 13, 2014 at 3:50 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
> > wrote:
> >> This week, we heard about a user willing to use a custom timestamp
> >> format across a set of services to improve the debugability of the
> >> whole set, Postgres being one of them. Unfortunately datestyle does
> >> not take into account the logs. Would it be worth adding a new GUC
> >> able to control the timestamp format in the logs?
>
> > A separate GUC seems kind of weird. Wouldn't it be better with something
> > like %(format)t or such in the log_line_prefix itself in that case? That
> > could also be expanded to other parameters, should we need them?
>
> TBH, my answer to the rhetorical question is "no". There is nothing
> weird about the timestamps %t emits now, and no reason why they should
> need to be configurable, except that somebody thinks it's easier to
> lobby us to complicate our software than to fix whatever they have that
> can't consume standard timestamp format.
I imagine pgBadger/pgFouine wouldn't be happy with the timestamp being
infinitely configurable.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-12-14 17:57:28 | Re: proposal: plpgsql - Assert statement |
Previous Message | Alvaro Herrera | 2014-12-14 17:48:01 | Re: pg_basebackup vs. Windows and tablespaces |