summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2016-08-08 13:11:29 -0400
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-08-23 11:57:34 -0700
commit5ce748ca45c6f2f867819400f50c9cdc12604226 (patch)
treeffb1ea26bf02cd13881549046f87dbc77eb3dedb /libglusterfs
parent063a234e6265265606425449da1d6c2f97fbf457 (diff)
logging: Avoid re-initing log level in io-stats
If log level is already set via api or command line, initialization of io-stats xlator overwrites the log level to GF_LOG_INFO. This patch prevents re-initialization of log level if already set. Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe BUG: 1368882 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reported-by: Colin Lord <clord@redhat.com> Reviewed-on: http://review.gluster.org/15112 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/ctx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c
index 2aa14654b9e..b009e6270a2 100644
--- a/libglusterfs/src/ctx.c
+++ b/libglusterfs/src/ctx.c
@@ -35,6 +35,8 @@ glusterfs_ctx_new ()
ctx->daemon_pipe[0] = -1;
ctx->daemon_pipe[1] = -1;
+ ctx->log.loglevel = DEFAULT_LOG_LEVEL;
+
/* lock is never destroyed! */
ret = LOCK_INIT (&ctx->lock);
if (ret) {