From 5ce748ca45c6f2f867819400f50c9cdc12604226 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 8 Aug 2016 13:11:29 -0400 Subject: logging: Avoid re-initing log level in io-stats If log level is already set via api or command line, initialization of io-stats xlator overwrites the log level to GF_LOG_INFO. This patch prevents re-initialization of log level if already set. Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe BUG: 1368882 Signed-off-by: Vijay Bellur Reported-by: Colin Lord Reviewed-on: http://review.gluster.org/15112 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Pranith Kumar Karampuri --- xlators/debug/io-stats/src/io-stats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/debug/io-stats') diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index e2963b7c196..86c0c189d89 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -3720,7 +3720,8 @@ init (xlator_t *this) GF_OPTION_INIT ("log-level", log_str, str, out); if (log_str) { log_level = glusterd_check_log_level (log_str); - gf_log_set_loglevel (log_level); + if (DEFAULT_LOG_LEVEL != log_level) + gf_log_set_loglevel (log_level); } GF_OPTION_INIT ("logger", logger_str, str, out); -- cgit