Add a that log_line_prefix should usually end with a space to
authorTom Lane
Fri, 22 Jun 2007 16:15:23 +0000 (16:15 +0000)
committerTom Lane
Fri, 22 Jun 2007 16:15:23 +0000 (16:15 +0000)
provide visual separation from the rest of the log line; I've been
noticing lately that quite a few newbies fail to figure this out for
themselves.  Also a little editorial cleanup of the log_line_prefix
description.

doc/src/sgml/config.sgml

index 1d806bf1b73124455151b91aca0ed89c9a3f41e5..a38b02fd211aae54f2f2b66b20af3f260cc478c9 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
   Server Configuration
@@ -2774,17 +2774,15 @@ SELECT * FROM parent WHERE key = 2400;
       
        
          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
+         beginning of each log line.
+         % characters begin escape sequences
+         that are replaced with status information as outlined below.
+         Unrecognized escapes are ignored. Other
          characters are copied straight to the log line. Some escapes are
          only recognized by session processes, and do not apply to
-         background processes such as the main server process. Syslog
-         produces its own 
-         time stamp and process ID information, so you probably do not want to
-         use those escapes if you are using syslog.
+         background processes such as the main server process.
          This parameter can only be set in the postgresql.conf
-         file or on the server command line.
+         file or on the server command line. The default is an empty string.
 
          
           
@@ -2823,7 +2821,7 @@ SELECT * FROM parent WHERE key = 2400;
             
             
              %t
-             Time stamp (no milliseconds, no timezone on Windows)
+             Time stamp without milliseconds (no timezone either on Windows)
              no
             
             
@@ -2833,16 +2831,12 @@ SELECT * FROM parent WHERE key = 2400;
             
             
              %i
-             Command tag: This is the command that generated the log line.
+             Command tag: type of session's current command
              yes
             
             
              %c
-             Session ID: A unique identifier for each session.
-             It is 2 4-byte hexadecimal numbers (without leading zeros) 
-             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.
+             Session ID: see below
              yes
             
             
@@ -2862,9 +2856,9 @@ SELECT * FROM parent WHERE key = 2400;
             
             
              %q
-             Does not produce any output, but tells non-session
-             processes to stop at this point in the string. Ignored by
-             session processes.
+             Produces no output, but tells non-session
+             processes to stop at this point in the string; ignored by
+             session processes
              no
             
             
@@ -2875,7 +2869,30 @@ SELECT * FROM parent WHERE key = 2400;
            
           
          
+
+         The %c escape prints a quasi-unique session identifier,
+         consisting of two 4-byte hexadecimal numbers (without leading zeros)
+         separated by a dot.  The numbers are the session start time and the
+         process ID, so %c can also be used as a space saving way
+         of printing those items.
        
+
+       
+        
+         If you set a nonempty value for log_line_prefix,
+         you should usually make its last character be a space, to provide
+         visual separation from the rest of the log line.  A punctuation
+         character could be used too.
+        
+       
+
+       
+        
+         Syslog produces its own 
+         time stamp and process ID information, so you probably do not want to
+         use those escapes if you are logging to syslog.
+        
+