summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2011-08-21 17:46:57 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-21 06:09:45 -0700
commitaf32ab6bc031347289201f33f496b6b713f7a3f6 (patch)
treed522c70faccce5fc053f526ded30eea703240347
parent5ace31ac2160b216a396c0d8c992fa19dbad6f47 (diff)
debug/io-stats: Handle loglevel in init
Change-Id: I5aa6ee7509a8f730ca64e2f7bada56d502785a6c BUG: 3415 Reviewed-on: http://review.gluster.com/287 Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--xlators/debug/io-stats/src/io-stats.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 902e1ea7ac1..e0d9849d965 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -2398,6 +2398,8 @@ init (xlator_t *this)
int i = 0;
char *sys_log_str = NULL;
int sys_log_level = -1;
+ char *log_str = NULL;
+ int log_level = -1;
int ret = -1;
if (!this)
@@ -2475,6 +2477,12 @@ init (xlator_t *this)
set_sys_log_level (sys_log_level);
}
+ 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);
+ }
+
this->private = conf;
ret = 0;
out: