summaryrefslogtreecommitdiffstats
path: root/xlators/debug
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/debug')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index bf513184025..0fdefd1e201 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -20,6 +20,7 @@
#ifndef _CONFIG_H
#define _CONFIG_H
#include "config.h"
+#include "xlator.h"
#endif
/**
@@ -1549,6 +1550,8 @@ reconfigure (xlator_t *this, dict_t *options)
struct ios_conf *conf = NULL;
char *str = NULL;
int ret = 0;
+ char *log_str = NULL;
+ glusterfs_ctx_t *ctx = NULL;
if (!this || !this->private)
return -1;
@@ -1579,6 +1582,21 @@ reconfigure (xlator_t *this, dict_t *options)
}
conf->measure_latency = ret;
}
+ ctx = glusterfs_ctx_get ();
+ if (!ctx)
+ return -1;
+
+ if (ctx->cmd_args.brick_name)
+ ret = dict_get_str (options, "log-level", &log_str);
+ else
+ ret = dict_get_str (options, "client-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);
+ }
+ }
return 0;
}
@@ -1737,5 +1755,11 @@ struct volume_options options[] = {
{ .key = { "latency-measurement" },
.type = GF_OPTION_TYPE_BOOL,
},
+ { .key = {"log-level"},
+ .type = GF_OPTION_TYPE_STR,
+ },
+ { .key = {"client-log-level"},
+ .type = GF_OPTION_TYPE_STR,
+ },
{ .key = {NULL} },
};