Re: Set log_line_prefix and application name in test drivers - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: Set log_line_prefix and application name in test drivers
Date
Msg-id 20160827195040.dytftqa2wejuoqgi@msg.df7cb.de
Whole thread Raw
In response to Re: Set log_line_prefix and application name in test drivers  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: Set log_line_prefix and application name in test drivers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Re: Fabien COELHO 2016-08-26 <alpine.DEB.2.20.1608261620260.7102@lancre>
> 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?

I've always been wondering why we don't set a log_line_prefix by
default. Logs without timestamps and (pid or session id or equivalent)
are useless. Of course in practise the log_line_prefix needs to be
different depending on the log_destination (syslog adds its own
timestamps, ...), but the current default of '' doesn't help anyone.

The above looks quite similar to what the Debian packages have been
setting as their default for some time, with standard stderr logging:
   log_line_prefix = '%t [%p-%l] %q%u@%d '

People who want a different log channel need to touch the config
anyway and can update log_line_prefix as they go.

The concrete value to be used needs to be discussed, but I think we'd
end up with something like '%m [%p:%l] ' plus maybe some suffix.

Christoph



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Bogus sizing parameters in some AllocSetContextCreate calls
Next
From: Tom Lane
Date:
Subject: Re: Bogus sizing parameters in some AllocSetContextCreate calls