From cfad660310978ffda6263d44ab2445d42c2621b2 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Mon, 18 Oct 2010 08:15:30 +0000 Subject: Log level mess clean up Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 1886 (log-level mess) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1886 --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 30 ----------------------------- xlators/mgmt/glusterd/src/glusterd-volgen.h | 1 - 2 files changed, 31 deletions(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index f3b237fb5..c8846a4fa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -738,8 +738,6 @@ loglevel_option_handler (glusterfs_graph_t *graph, !strstr (vme->key, role)) return 0; - if (glusterd_check_log_level(vme->value) == -1) - return -1; memcpy (&vme2, vme, sizeof (vme2)); vme2.option = "log-level"; @@ -1386,31 +1384,3 @@ out: gf_log ("", GF_LOG_DEBUG, "Returning %d", ret); return ret; } - -int -glusterd_check_log_level (const char *value) -{ - int log_level = -1; - - if (!strcasecmp (value, "CRITICAL")) { - log_level = GF_LOG_CRITICAL; - } else if (!strcasecmp (value, "ERROR")) { - log_level = GF_LOG_ERROR; - } else if (!strcasecmp (value, "WARNING")) { - log_level = GF_LOG_WARNING; - } else if (!strcasecmp (value, "INFO")) { - log_level = GF_LOG_INFO; - } else if (!strcasecmp (value, "DEBUG")) { - log_level = GF_LOG_DEBUG; - } else if (!strcasecmp (value, "TRACE")) { - log_level = GF_LOG_TRACE; - } else if (!strcasecmp (value, "NONE")) { - log_level = GF_LOG_NONE; - } - - if (log_level == -1) - gf_log ("", GF_LOG_ERROR, "Invalid log-level. possible values " - "are DEBUG|WARNING|ERROR|CRITICAL|NONE|TRACE"); - - return log_level; -} diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h index 0e6be800d..e84e183ee 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.h +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h @@ -41,5 +41,4 @@ int glusterd_delete_volfile (glusterd_volinfo_t *volinfo, int glusterd_volinfo_get (glusterd_volinfo_t *volinfo, char *key, char **value); -int glusterd_check_log_level (const char *log_level); #endif -- cgit