Hello Peter,

log_line_prefix = '%t [%p]: [%l] %qapp=%a '

which is modeled after the pgfouine recommendation, which is I believe a
wide-spread convention, and it also vaguely follows syslog customs.

The build farm client has

log_line_prefix = '%m [%c:%l] '

which is very similar, but the lack of the PID makes it unsuitable for
the purposes that I have set out, and there is no obvious place to put
additional information such as %a.

%m vs %t is obviously a minor issue that I will gladly adjust, but
besides that I prefer to stick with my version.

v2 patch looks ok, applies without trouble and works as intended:

  2016-08-26 09:19:31.191 CEST [7571]: [58] app=pg_regress/event_trigger 
STATEMENT:  alter type rewritetype alter attribute a type varchar cascade;

About the format: '[\d+]' pattern is used twice, which makes the output less easily grep-able.

Also, the ':' is used as a separator in the remainder of the message, so maybe once is enough at this level.

I'm not sure about the "app=" is really necessary, given its very explicit definition as can be seen above above.

So I would suggest something like the following, which is also a little bit more compact:

  log_line_prefix = '%m [%p:%l] %q%a '

If you want to keep something with %a, maybe parentheses?

Finally I'm wondering also whether a timestamp since the server has started (which does not exists) would be more useful for a "make check", or at default maybe %n?


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to