diff options
author | shishir gowda <shishirng@gluster.com> | 2010-10-18 08:15:30 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-24 22:43:00 -0700 |
commit | cfad660310978ffda6263d44ab2445d42c2621b2 (patch) | |
tree | df77387dcf6d67e8c9c7113e396ef2c450e7218f /xlators/debug/io-stats | |
parent | f014877f37488d6f9d4c505f0675ad45cd770546 (diff) |
Log level mess clean up
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1886 (log-level mess)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1886
Diffstat (limited to 'xlators/debug/io-stats')
-rw-r--r-- | xlators/debug/io-stats/src/io-stats.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 17d4e2909fa..8068ff4160e 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -1702,6 +1702,23 @@ fini (xlator_t *this) return; } +int +validate_options (xlator_t *this, dict_t *options, char **op_errstr) +{ + int ret = -1; + char *log_str = NULL; + + ret = dict_get_str (options, "log-level", &log_str); + if (ret) + return 0; + ret = glusterd_check_log_level(log_str); + if (ret == -1) + *op_errstr = gf_strdup ("Invalid log level. possible option are" + " DEBUG|WARNING|ERROR|CRITICAL|NONE|TRACE"); + else + ret = 0; + return ret; +} struct xlator_fops fops = { .stat = io_stats_stat, |