mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Default was previously NOTICE (as in repmgr 3.x) but documentation implied it was INFO, and many of the the documentation examples assume it is. This produces some quite informative log output, without creating excessive log file volume. In particular it's useful to get a better idea of what repmgrd is actually doing. Also add documentation section for the log configuration parameters. GitHub #470, containing change suggested in GitHub #467.
108 lines
4.0 KiB
Plaintext
108 lines
4.0 KiB
Plaintext
<sect1 id="configuration-file-log-settings" xreflabel="log settings">
|
|
<indexterm>
|
|
<primary>repmgr.conf</primary>
|
|
<secondary>log settings</secondary>
|
|
</indexterm>
|
|
<indexterm>
|
|
<primary>log settings</primary>
|
|
<secondary>configuration in repmgr.conf</secondary>
|
|
</indexterm>
|
|
<title>Log settings</title>
|
|
|
|
<para>
|
|
By default, &repmgr; and <application>repmgrd</application> write log output to
|
|
<literal>STDERR</literal>. An alternative log destination can be specified
|
|
(either a file or <literal>syslog</literal>).
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
The &repmgr; application itself will continue to write log output to <literal>STDERR</literal>
|
|
even if another log destination is configured, as otherwise any output resulting from a command
|
|
line operation will "disappear" into the log.
|
|
</para>
|
|
<para>
|
|
This behaviour can be overriden with the command line option <option>--log-to-file</option>,
|
|
which will redirect all logging output to the configured log destination. This is recommended
|
|
when &repmgr; is executed by another application, particularly <application>repmgrd</application>,
|
|
to enable log output generated by the &repmgr; application to be stored for later reference.
|
|
</para>
|
|
</note>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry id="repmgr-conf-log-level" xreflabel="log_level">
|
|
<term><varname>log_level</varname> (<type>string</type>)
|
|
<indexterm>
|
|
<primary><varname>log_level</varname> configuration file parameter</primary>
|
|
</indexterm>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
One of <option>DEBUG</option>, <option>INFO</option>, <option>NOTICE</option>,
|
|
<option>WARNING</option>, <option>ERROR</option>, <option>ALERT</option>, <option>CRIT</option>
|
|
or <option>EMERG</option>.
|
|
</para>
|
|
<para>
|
|
Default is <option>INFO</option>.
|
|
</para>
|
|
<para>
|
|
Note that <option>DEBUG</option> will produce a substantial amount of log output
|
|
and should not be enabled in normal use.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="repmgr-conf-log-facility" xreflabel="log_facility">
|
|
<term><varname>log_facility</varname> (<type>string</type>)
|
|
<indexterm>
|
|
<primary><varname>log_facility</varname> configuration file parameter</primary>
|
|
</indexterm>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Logging facility: possible values are <option>STDERR</option> (default), or for
|
|
syslog integration, one of <option>LOCAL0</option>, <option>LOCAL1</option>, <option>...</option>,
|
|
<option>LOCAL7</option>, <option>USER</option>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="repmgr-conf-log-file" xreflabel="log_file">
|
|
<term><varname>log_file</varname> (<type>string</type>)
|
|
<indexterm>
|
|
<primary><varname>log_file</varname> configuration file parameter</primary>
|
|
</indexterm>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
If <xref linkend="repmgr-conf-log-facility"> is set to <option>STDERR</option>, log output
|
|
can be redirected to the specified file.
|
|
</para>
|
|
<para>
|
|
See <xref linkend="repmgrd-log-rotation"> for information on configuring log rotation.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="repmgr-conf-log-status-interval" xreflabel="log_status_interval">
|
|
<term><varname>log_status_interval</varname> (<type>integer</type>)
|
|
<indexterm>
|
|
<primary><varname>log_status_interval</varname> configuration file parameter</primary>
|
|
</indexterm>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This setting causes <application>repmgrd</application> to emit a status log
|
|
line at the specified interval (in seconds, default <literal>300</literal>)
|
|
describing <application>repmgrd</application>'s current state, e.g.:
|
|
</para>
|
|
<programlisting>
|
|
[2018-07-12 00:47:32] [INFO] monitoring connection to upstream node "node1" (node ID: 1)</programlisting>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect1>
|