1<sect1 id="configuration-file-log-settings" xreflabel="log settings"> 2 <title>Log settings</title> 3 4 <indexterm> 5 <primary>repmgr.conf</primary> 6 <secondary>log settings</secondary> 7 </indexterm> 8 <indexterm> 9 <primary>log settings</primary> 10 <secondary>configuration in repmgr.conf</secondary> 11 </indexterm> 12 13 <para> 14 By default, &repmgr; and &repmgrd; write log output to 15 <literal>STDERR</literal>. An alternative log destination can be specified 16 (either a file or <literal>syslog</literal>). 17 </para> 18 19 <note> 20 <para> 21 The &repmgr; application itself will continue to write log output to <literal>STDERR</literal> 22 even if another log destination is configured, as otherwise any output resulting from a command 23 line operation will "disappear" into the log. 24 </para> 25 <para> 26 This behaviour can be overriden with the command line option <option>--log-to-file</option>, 27 which will redirect all logging output to the configured log destination. This is recommended 28 when &repmgr; is executed by another application, particularly &repmgrd;, 29 to enable log output generated by the &repmgr; application to be stored for later reference. 30 </para> 31 </note> 32 33 <variablelist> 34 35 <varlistentry id="repmgr-conf-log-level" xreflabel="log_level"> 36 <term><varname>log_level</varname> (<type>string</type>)</term> 37 <listitem> 38 <indexterm> 39 <primary><varname>log_level</varname> configuration file parameter</primary> 40 </indexterm> 41 <para> 42 One of <option>DEBUG</option>, <option>INFO</option>, <option>NOTICE</option>, 43 <option>WARNING</option>, <option>ERROR</option>, <option>ALERT</option>, <option>CRIT</option> 44 or <option>EMERG</option>. 45 </para> 46 <para> 47 Default is <option>INFO</option>. 48 </para> 49 <para> 50 Note that <option>DEBUG</option> will produce a substantial amount of log output 51 and should not be enabled in normal use. 52 </para> 53 </listitem> 54 </varlistentry> 55 56 <varlistentry id="repmgr-conf-log-facility" xreflabel="log_facility"> 57 <term><varname>log_facility</varname> (<type>string</type>) 58 <indexterm> 59 <primary><varname>log_facility</varname> configuration file parameter</primary> 60 </indexterm> 61 </term> 62 <listitem> 63 <para> 64 Logging facility: possible values are <option>STDERR</option> (default), or for 65 syslog integration, one of <option>LOCAL0</option>, <option>LOCAL1</option>, <option>...</option>, 66 <option>LOCAL7</option>, <option>USER</option>. 67 </para> 68 </listitem> 69 </varlistentry> 70 71 <varlistentry id="repmgr-conf-log-file" xreflabel="log_file"> 72 <term><varname>log_file</varname> (<type>string</type>) 73 <indexterm> 74 <primary><varname>log_file</varname> configuration file parameter</primary> 75 </indexterm> 76 </term> 77 <listitem> 78 <para> 79 If <xref linkend="repmgr-conf-log-facility"/> is set to <option>STDERR</option>, log output 80 can be redirected to the specified file. 81 </para> 82 <para> 83 See <xref linkend="repmgrd-log-rotation"/> for information on configuring log rotation. 84 </para> 85 </listitem> 86 </varlistentry> 87 88 <varlistentry id="repmgr-conf-log-status-interval" xreflabel="log_status_interval"> 89 <term><varname>log_status_interval</varname> (<type>integer</type>) 90 <indexterm> 91 <primary><varname>log_status_interval</varname> configuration file parameter</primary> 92 </indexterm> 93 </term> 94 <listitem> 95 <para> 96 This setting causes &repmgrd; to emit a status log 97 line at the specified interval (in seconds, default <literal>300</literal>) 98 describing &repmgrd;'s current state, e.g.: 99 </para> 100 <programlisting> 101 [2018-07-12 00:47:32] [INFO] monitoring connection to upstream node "node1" (ID: 1)</programlisting> 102 </listitem> 103 </varlistentry> 104 105 </variablelist> 106 107</sect1> 108