This value might not be to everyone's taste; in particular, some
people might prefer %t to %m, and others may want %u, %d, or other
fields. However, it's a vast improvement on the old default of ''.
Christoph Berg
value will pad on the left. Padding can be useful to aid human
readability in log files.
This parameter can only be set in the <filename>postgresql.conf</>
- file or on the server command line. The default is an empty string.
+ file or on the server command line. The default is
+ <literal>'%m [%p] '</> which logs a time stamp and the process ID.
<informaltable>
<tgroup cols="3">
include those escapes if you are logging to <application>syslog</>.
</para>
</tip>
+
+ <tip>
+ <para>
+ The <literal>%q</> escape is useful when including information that is
+ only available in session (backend) context like user or database
+ name. For example:
+<programlisting>
+log_line_prefix = '%m [%p] %q%u@%d/%a '
+</programlisting>
+ </para>
+ </tip>
</listitem>
</varlistentry>
gettext_noop("If blank, no prefix is used.")
},
&Log_line_prefix,
- "",
+ "%m [%p] ",
NULL, NULL, NULL
},
#log_duration = off
#log_error_verbosity = default # terse, default, or verbose messages
#log_hostname = off
-#log_line_prefix = '' # special values:
+#log_line_prefix = '%m [%p] ' # special values:
# %a = application name
# %u = user name
# %d = database name