summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-08-07 13:13:24 +0530
committerAnand Avati <avati@redhat.com>2012-08-07 03:17:20 -0700
commitbfac66f129646bc78f1ed3a7dccb3010114e57aa (patch)
tree3981e0faacfa9d62081ab84f3068b39f5c0c2e40 /libglusterfs/src
parent828b2b7059093972381bc64047025a7d8cac508e (diff)
logging: do the 'right' check for loglevel
logging functions should not print anything if loglevel in argument list is lower than what is set for the process. Change-Id: Id61779ffe6b76724243aa222c6889dd51a8f2f9b Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 846201 Reviewed-on: http://review.gluster.com/3786 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/logging.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 40981b52623..78560870987 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -192,9 +192,9 @@ _gf_log_nomem (const char *domain, const char *file,
if (ctx->log.gf_log_xl_log_set) {
if (this->loglevel && (level > this->loglevel))
goto out;
- else if (level > ctx->log.loglevel)
- goto out;
}
+ if (level > ctx->log.loglevel)
+ goto out;
static char *level_strings[] = {"", /* NONE */
"M", /* EMERGENCY */
@@ -308,9 +308,9 @@ _gf_log_callingfn (const char *domain, const char *file, const char *function,
if (ctx->log.gf_log_xl_log_set) {
if (this->loglevel && (level > this->loglevel))
goto out;
- else if (level > ctx->log.loglevel)
- goto out;
}
+ if (level > ctx->log.loglevel)
+ goto out;
static char *level_strings[] = {"", /* NONE */
"M", /* EMERGENCY */
@@ -445,9 +445,9 @@ _gf_log (const char *domain, const char *file, const char *function, int line,
if (ctx->log.gf_log_xl_log_set) {
if (this->loglevel && (level > this->loglevel))
goto out;
- else if (level > ctx->log.loglevel)
- goto out;
}
+ if (level > ctx->log.loglevel)
+ goto out;
static char *level_strings[] = {"", /* NONE */
"M", /* EMERGENCY */