From 1e421a5bbf075994882a1fefe1099bf6622d90f6 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 8 Aug 2016 13:11:29 -0400 Subject: 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. Backport of: > Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe > BUG: 1368882 > Signed-off-by: Vijay Bellur > Reported-by: Colin Lord > Reviewed-on: http://review.gluster.org/15112 > NetBSD-regression: NetBSD Build System > Smoke: Gluster Build System > CentOS-regression: Gluster Build System > Reviewed-by: Niels de Vos > Reviewed-by: Pranith Kumar Karampuri Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe BUG: 1378384 Signed-off-by: Prasanna Kumar Kalever Reviewed-on: http://review.gluster.org/15544 Smoke: Gluster Build System Reviewed-by: Vijay Bellur Reviewed-by: Niels de Vos NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- libglusterfs/src/ctx.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libglusterfs') 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) { -- cgit