1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-07 00:58:40 +03:00

ctdb-logging: Really make NOTICE the default debug level

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>
This commit is contained in:
Martin Schwenke 2023-02-10 17:57:13 +11:00 committed by Amitay Isaacs
parent edad945339
commit 51d0445a7d
4 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@
#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,

View File

@ -145,7 +145,7 @@ int ctdbd_config_load(TALLOC_CTX *mem_ctx,
return ret;
}
logging_conf_init(conf, "NOTICE");
logging_conf_init(conf, NULL);
cluster_conf_init(conf);
database_conf_init(conf);
event_conf_init(conf);

View File

@ -30,7 +30,7 @@ database_state_dbdir=$(ctdb-config get \
ok <<EOF
[logging]
# location = ${logging_location}
# log level = ERROR
# log level = NOTICE
[cluster]
# transport = tcp
# node address =

View File

@ -19,7 +19,7 @@ cat > "$conffile" <<EOF
EOF
ok <<EOF
ERROR
NOTICE
EOF
unit_test ctdb-config get "logging" "log level"