summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-03-09 04:43:07 +0000
committerBruce Momjian <bruce@momjian.us>2004-03-09 04:43:07 +0000
commit2d3fe86bc4b5675ee8b9a961d3662da7c5dae341 (patch)
treecca18227333ac4c60bc06e3b58f81c7d78d6a7bc /doc/src
parentaf96aa9ab186f71c99ff74ddc43c28b4a2705d66 (diff)
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/runtime.sgml94
1 files changed, 93 insertions, 1 deletions
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 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.245 2004/03/07 01:02:55 neilc Exp $
+$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.246 2004/03/09 04:43:06 momjian Exp $
-->
<Chapter Id="runtime">
@@ -1973,6 +1973,98 @@ SET ENABLE_SEQSCAN TO OFF;
</varlistentry>
<varlistentry>
+ <term><varname>log_line_prefix</varname> (<type>string</type>)</term>
+ <listitem>
+ <para>
+ This is a <literal>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. <application>Syslog</> produces its own
+ timestamp and process ID information, so you probably do not want to
+ use those escapes if you are using <application>syslog</>.
+ <informaltable>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Escape</entry>
+ <entry>Effect</entry>
+ <entry>Session only</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>%u</literal></entry>
+ <entry>User Name</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry><literal>%d</literal></entry>
+ <entry>Database Name</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry><literal>%r</literal></entry>
+ <entry>Remote Hostname or IP address, and Remote Port</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry><literal>%p</literal></entry>
+ <entry>Process ID</entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry><literal>%t</literal></entry>
+ <entry>Timestamp</entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry><literal>%i</literal></entry>
+ <entry>Command Tag. This is the command which generated the log
+ line.</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry><literal>%c</literal></entry>
+ <entry>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.</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry><literal>%l</literal></entry>
+ <entry>Number of the log line for each process,
+ starting at 1</entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry><literal>%s</literal></entry>
+ <entry>Session Start Timestamp</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry><literal>%x</literal></entry>
+ <entry>Does not produce any output, but tells non-session
+ processes to stop at this point in the string. Ignored by
+ session backends.</entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry><literal>%%</literal></entry>
+ <entry>literal <literal>%</></entry>
+ <entry>No</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>log_pid</varname> (<type>boolean</type>)</term>
<listitem>
<para>