From 41b14258c08a0065c573a2ec9f39fb3354fd9be3 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Mon, 18 Oct 2010 05:02:11 +0000 Subject: debug/io-stats: init() should also set loglevel Signed-off-by: Kaushik BV Signed-off-by: Anand V. Avati BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159 --- xlators/debug/io-stats/src/io-stats.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'xlators/debug') diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 8068ff416..90f02b6ee 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -1588,7 +1588,7 @@ reconfigure (xlator_t *this, dict_t *options) ret = dict_get_str (options, "log-level", &log_str); if (!ret) { - if (!is_gf_log_command(this, "trusted.glusterfs*set-log-level", log_str)) { + if (!is_gf_log_command(this, "trusted.glusterfs.set-log-level", log_str)) { gf_log (this->name, GF_LOG_DEBUG, "changing log-level to %s", log_str); } @@ -1622,6 +1622,7 @@ init (xlator_t *this) struct ios_conf *conf = NULL; char *str = NULL; int ret = 0; + char *log_str = NULL; if (!this) return -1; @@ -1675,6 +1676,14 @@ init (xlator_t *this) "enabling latency measurement"); } + ret = dict_get_str (options, "log-level", &log_str); + if (!ret) { + if (!is_gf_log_command(this, "trusted.glusterfs.set-log-level", log_str)) { + gf_log (this->name, GF_LOG_DEBUG, + "changing log-level to %s", log_str); + } + } + this->private = conf; return 0; -- cgit