NOTICE level debug messages in common/run_event.c are not logged by
default.
Currently eventd ends up using ERROR, since this is specified as
LOGGING_LOG_LEVEL_DEFAULT. It doesn't inherit the debug level from
ctdbd and only uses NOTICE level when interactive.
Change the real logging default to NOTICE and use it everywhere.
Followups might be:
* Remove the default_log_level argument to logging_conf_init()
* Kick eventd to update debug level when "ctdb setdebug" is used
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
#include "common/logging_conf.h"
#define LOGGING_LOCATION_DEFAULT "file:" LOGDIR "/log.ctdb"
-#define LOGGING_LOG_LEVEL_DEFAULT "ERROR"
+#define LOGGING_LOG_LEVEL_DEFAULT "NOTICE"
static bool logging_conf_validate_log_level(const char *key,
const char *old_loglevel,
return ret;
}
- logging_conf_init(conf, "NOTICE");
+ logging_conf_init(conf, NULL);
cluster_conf_init(conf);
database_conf_init(conf);
event_conf_init(conf);
ok <<EOF
[logging]
# location = ${logging_location}
- # log level = ERROR
+ # log level = NOTICE
[cluster]
# transport = tcp
# node address =
EOF
ok <<EOF
-ERROR
+NOTICE
EOF
unit_test ctdb-config get "logging" "log level"