ctdb: Change default debug level to NOTICE (2)
authorMartin Schwenke <martin@meltin.net>
Mon, 9 Feb 2015 01:04:41 +0000 (12:04 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 18 Feb 2015 04:34:06 +0000 (05:34 +0100)
This was true for the daemon until commit
b4589b954e1090a934fafd3f8e3c2cf1ed785c61.

Defaulting to ERR in the ctdb CLI tool encourages logging notices at
ERR level, so default to NOTICE instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/common/cmdline.c
ctdb/config/ctdb.sysconfig
ctdb/doc/ctdb.1.xml
ctdb/doc/ctdbd.1.xml
ctdb/doc/ctdbd.conf.5.xml

index 4ed3fae64d7ce60dfcc646b9286cbd2ad4be7a26..7fcb91f83a8c1cc68902574ef54014fa8f0ea06b 100644 (file)
@@ -37,7 +37,7 @@ static struct {
        const char *events;
 } ctdb_cmdline = {
        .torture = 0,
-       .debuglevel = "ERR",
+       .debuglevel = "NOTICE",
 };
 
 enum {OPT_EVENTSYSTEM=1};
@@ -97,7 +97,7 @@ struct ctdb_context *ctdb_cmdline_init(struct event_context *ev)
 
        /* Set the debug level */
        if (!parse_debug(ctdb_cmdline.debuglevel, &DEBUGLEVEL)) {
-               DEBUGLEVEL = DEBUG_ERR;
+               DEBUGLEVEL = DEBUG_NOTICE;
        }
 
        /* set up the tree to store server ids */
@@ -146,7 +146,7 @@ struct ctdb_context *ctdb_cmdline_client(struct tevent_context *ev,
 
        /* Set the debug level */
        if (!parse_debug(ctdb_cmdline.debuglevel, &DEBUGLEVEL)) {
-               DEBUGLEVEL = DEBUG_ERR;
+               DEBUGLEVEL = DEBUG_NOTICE;
        }
 
        ret = ctdb_socket_connect(ctdb);
index b44e478b9377b05612b6005ab605bec973455147..9541d503c75e2f092cdb9c25bcff8db30f78536b 100644 (file)
@@ -25,8 +25,8 @@ CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
 # Default is to use the log file below instead of syslog.
 # CTDB_LOGGING=file:/var/log/log.ctdb
 
-# Default log level is ERR.  NOTICE is a little more verbose.
-CTDB_DEBUGLEVEL=NOTICE
+# Default log level is NOTICE.  Want less logging?
+# CTDB_DEBUGLEVEL=ERR
 
 # Set some CTDB tunable variables during CTDB startup?
 # CTDB_SET_TraverseTimeout=60
index 1a1ae40fbeca9834d6d0bc95d6a3e7a6be6443a4..e95caa0a89a7225674bafd09207c510d06249cfa 100644 (file)
       <varlistentry><term>-d --debug=<parameter>DEBUGLEVEL</parameter></term>
       <listitem>
        <para>
-         Change the debug level for the command. Default is ERR (0).
+         Change the debug level for the command. Default is NOTICE (2).
        </para>
       </listitem>
       </varlistentry>
index fc17acf7d02630c81e0fd8cf325f48731cdc3cdc..b5feea2fe650bc435174770f453c2a0979d418c4 100644 (file)
@@ -52,9 +52,7 @@
          <para>
            This option sets the debug level to DEBUGLEVEL, which
            controls what will be written by the logging
-           subsystem. The default is 0 which will only log important
-           events and errors. A larger number will provide additional
-           logging.
+           subsystem.  The default is 2.
          </para>
          <para>
            See the <citetitle>DEBUG LEVELS</citetitle> section in
index 52c1298f414138889d8b2cb285be37eba9f125d7..8a62c86615b29fdbc097e464561361623f3e67ab 100644 (file)
        <term>CTDB_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
        <listitem>
          <para>
-           Default is ERR (0).  Corresponds to <option>-d</option> or
+           Default is NOTICE (2).  Corresponds to <option>-d</option> or
            <option>--debug</option>.
          </para>
        </listitem>