From 2d3fe86bc4b5675ee8b9a961d3662da7c5dae341 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 9 Mar 2004 04:43:07 +0000 Subject: Add: #log_line_prefix = '' # e.g. '<%u%%%d> ' # %u=user name %d=database name # %r=remote host and port # %p=PID %t=timestamp %i=command tag # %c=session id %l=session line number # %s=session start timestamp # %x=stop here in non-session processes # %%='%' Andrew Dunstan --- doc/src/sgml/runtime.sgml | 94 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 5c67f70863e..335a404f070 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -1972,6 +1972,98 @@ SET ENABLE_SEQSCAN TO OFF; + + log_line_prefix (string) + + + This is a printf-style string that is output at the + beginning of each log line. The default is an empty string. + Each recognized escape is replaced as outlined + below - anything else that looks like an escape is ignored. Other + characters are copied straight to the log line. Some escapes are + only recognised by session processes, and do not apply to + processes without controlling sessions. Syslog produces its own + timestamp and process ID information, so you probably do not want to + use those escapes if you are using syslog. + + + + + Escape + Effect + Session only + + + + + %u + User Name + Yes + + + %d + Database Name + Yes + + + %r + Remote Hostname or IP address, and Remote Port + Yes + + + %p + Process ID + No + + + %t + Timestamp + No + + + %i + Command Tag. This is the command which generated the log + line. + Yes + + + %c + Session ID. A unique identifier for each session. + It is 2 4-byte hexadecimal numbers separated by a dot. The numbers + are the Session Start Time and the Process ID, so this can also + be used as a space saving way of printing these items. + Yes + + + %l + Number of the log line for each process, + starting at 1 + No + + + %s + Session Start Timestamp + Yes + + + %x + Does not produce any output, but tells non-session + processes to stop at this point in the string. Ignored by + session backends. + No + + + %% + literal % + No + + + + + + + + log_pid (boolean) -- cgit v1.2.3