summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-09-24 00:49:51 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-24 01:19:08 -0700
commitd528f134094d86ec7344875160a41e0ce4ebc1b0 (patch)
tree2fd1a419d45a003903c2de60e516fa3dcbf5eb15
parentcd13c7e7368ec60ec9b6559e2eced41bcc10d6bc (diff)
libglusterfsclient: Support TRACE loglevel
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 210 (libglusterfsclient: Enhance logging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=210
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 8ed1493fa..32059123d 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -1101,9 +1101,12 @@ glusterfs_init (glusterfs_init_params_t *init_ctx, uint32_t fakefsid)
} else if (!strncasecmp (init_ctx->loglevel, "ERROR",
strlen ("ERROR"))) {
ctx->gf_ctx.cmd_args.log_level = GF_LOG_ERROR;
+ } else if (!strncasecmp (init_ctx->loglevel, "TRACE",
+ strlen ("TRACE"))) {
+ ctx->gf_ctx.cmd_args.log_level = GF_LOG_TRACE;
} else {
fprintf (stderr,
- "libglusterfsclient: %s:%s():%d: Unrecognized log-level \"%s\", possible values are \"DEBUG|WARNING|[ERROR]|CRITICAL|NONE\"\n",
+ "libglusterfsclient: %s:%s():%d: Unrecognized log-level \"%s\", possible values are \"DEBUG|WARNING|[ERROR]|CRITICAL|NONE|TRACE\"\n",
__FILE__, __PRETTY_FUNCTION__, __LINE__,
init_ctx->loglevel);
FREE (ctx->gf_ctx.cmd_args.log_file);