summaryrefslogtreecommitdiffstats
path: root/xlators/debug/io-stats
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2010-10-18 05:02:11 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-10-24 22:43:06 -0700
commit41b14258c08a0065c573a2ec9f39fb3354fd9be3 (patch)
tree6e9643d6279c5ff05a99f032f0009a22d23b4d1e /xlators/debug/io-stats
parentcfad660310978ffda6263d44ab2445d42c2621b2 (diff)
debug/io-stats: init() should also set loglevel
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
Diffstat (limited to 'xlators/debug/io-stats')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 8068ff4160e..90f02b6ee83 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;