1- <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.127 2007/06/19 20:13:21 tgl Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.128 2007/06/22 16:15:23 tgl Exp $ -->
22
33<chapter Id="runtime-config">
44 <title>Server Configuration</title>
@@ -2774,17 +2774,15 @@ SELECT * FROM parent WHERE key = 2400;
27742774 <listitem>
27752775 <para>
27762776 This is a <function>printf</>-style string that is output at the
2777- beginning of each log line. The default is an empty string.
2778- Each recognized escape is replaced as outlined
2779- below - anything else that looks like an escape is ignored. Other
2777+ beginning of each log line.
2778+ <literal>%</> characters begin <quote>escape sequences</>
2779+ that are replaced with status information as outlined below.
2780+ Unrecognized escapes are ignored. Other
27802781 characters are copied straight to the log line. Some escapes are
27812782 only recognized by session processes, and do not apply to
2782- background processes such as the main server process. <application>Syslog</>
2783- produces its own
2784- time stamp and process ID information, so you probably do not want to
2785- use those escapes if you are using <application>syslog</>.
2783+ background processes such as the main server process.
27862784 This parameter can only be set in the <filename>postgresql.conf</>
2787- file or on the server command line.
2785+ file or on the server command line. The default is an empty string.
27882786
27892787 <informaltable>
27902788 <tgroup cols="3">
@@ -2823,7 +2821,7 @@ SELECT * FROM parent WHERE key = 2400;
28232821 </row>
28242822 <row>
28252823 <entry><literal>%t</literal></entry>
2826- <entry>Time stamp(no milliseconds, no timezone on Windows)</entry>
2824+ <entry>Time stampwithout milliseconds ( no timezone either on Windows)</entry>
28272825 <entry>no</entry>
28282826 </row>
28292827 <row>
@@ -2833,16 +2831,12 @@ SELECT * FROM parent WHERE key = 2400;
28332831 </row>
28342832 <row>
28352833 <entry><literal>%i</literal></entry>
2836- <entry>Command tag:This is the command that generated the log line. </entry>
2834+ <entry>Command tag:type of session's current command </entry>
28372835 <entry>yes</entry>
28382836 </row>
28392837 <row>
28402838 <entry><literal>%c</literal></entry>
2841- <entry>Session ID: A unique identifier for each session.
2842- It is 2 4-byte hexadecimal numbers (without leading zeros)
2843- separated by a dot. The numbers
2844- are the session start time and the process ID, so this can also
2845- be used as a space saving way of printing these items.</entry>
2839+ <entry>Session ID: see below</entry>
28462840 <entry>yes</entry>
28472841 </row>
28482842 <row>
@@ -2862,9 +2856,9 @@ SELECT * FROM parent WHERE key = 2400;
28622856 </row>
28632857 <row>
28642858 <entry><literal>%q</literal></entry>
2865- <entry>Does not produce any output, but tells non-session
2866- processes to stop at this point in the string. Ignored by
2867- session processes. </entry>
2859+ <entry>Produces no output, but tells non-session
2860+ processes to stop at this point in the string; ignored by
2861+ session processes</entry>
28682862 <entry>no</entry>
28692863 </row>
28702864 <row>
@@ -2875,7 +2869,30 @@ SELECT * FROM parent WHERE key = 2400;
28752869 </tbody>
28762870 </tgroup>
28772871 </informaltable>
2872+
2873+ The <literal>%c</> escape prints a quasi-unique session identifier,
2874+ consisting of two 4-byte hexadecimal numbers (without leading zeros)
2875+ separated by a dot. The numbers are the session start time and the
2876+ process ID, so <literal>%c</> can also be used as a space saving way
2877+ of printing those items.
28782878 </para>
2879+
2880+ <tip>
2881+ <para>
2882+ If you set a nonempty value for <varname>log_line_prefix</>,
2883+ you should usually make its last character be a space, to provide
2884+ visual separation from the rest of the log line. A punctuation
2885+ character could be used too.
2886+ </para>
2887+ </tip>
2888+
2889+ <tip>
2890+ <para>
2891+ <application>Syslog</> produces its own
2892+ time stamp and process ID information, so you probably do not want to
2893+ use those escapes if you are logging to <application>syslog</>.
2894+ </para>
2895+ </tip>
28792896 </listitem>
28802897 </varlistentry>
28812898