Chester Kustarz wrote:
>On Thu, 5 Feb 2004, Bruce Momjian wrote:
>
>
>>Wow, like the idea too --- pid plus time_t start time of backend.
>>Actully, it would be good to have star time first so you can sort
>>everything in order of start time.
>>
>>
>
>Why not just add a printf like pattern so the user can output
>whatever they like?
> %p - backend pid
> %t - connect time
> %C - standard connection string "%t:%p"
> %a - autoincrement number
>
>
log_line_info where this would be implemented is indeed done with a
printf like string, which is easily extensible The following is adapted
from the description of the original patch which it is my intention to
bring up to date soon and resubmit:
Prefixes each message in the server log file or syslog with extra information as specified in the string.
Thedefault is an empty string. The following sequences in the string are translated: '%U' is replace with
theusername, '%D' is replaced by the database name, and '%%' is replaced by '%'. All other characters
arecopied literally to the log. For example, log_line_info = '<%U%%%D> ' will produce output like this:
<myuser%mydb> LOG: query: create table foo(blah text);
cheers
andrew