summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/logging.c
diff options
context:
space:
mode:
authorMohamed Ashiq <mliyazud@redhat.com>2015-07-29 23:47:34 +0530
committerJeff Darcy <jdarcy@redhat.com>2015-09-01 05:58:40 -0700
commit7b390983768e833a8df15b994038155c53d71bdd (patch)
tree26d17803696bec22f2d780e10f4075a48af53ee3 /libglusterfs/src/logging.c
parent31000d1a62da4e8beafb6f5a7b30ae593479a1ce (diff)
logging : GF_LOG_NONE logs always
Shouldn't GF_LOG_NONE mean "Never log this"? If so, it's not being tested for and is, instead, treated as a higher priority than CRITICAL thus is always logged. Change-Id: Icad1e02a720a05ff21bd54ebf19c0032e6d5ce03 BUG: 1246794 Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/11797 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src/logging.c')
-rw-r--r--libglusterfs/src/logging.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 147ee383751..7081b184de9 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -793,7 +793,7 @@ _gf_log_callingfn (const char *domain, const char *file, const char *function,
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
static char *level_strings[] = {"", /* NONE */
@@ -982,7 +982,7 @@ _gf_msg_plain (gf_loglevel_t level, const char *fmt, ...)
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
va_start (ap, fmt);
@@ -1018,7 +1018,7 @@ _gf_msg_vplain (gf_loglevel_t level, const char *fmt, va_list ap)
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
ret = vasprintf (&msg, fmt, ap);
@@ -1050,7 +1050,7 @@ _gf_msg_plain_nomem (gf_loglevel_t level, const char *msg)
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
ret = _gf_msg_plain_internal (level, msg);
@@ -1082,7 +1082,7 @@ _gf_msg_backtrace_nomem (gf_loglevel_t level, int stacksize)
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
bt_size = backtrace (array, ((stacksize <= 200)? stacksize : 200));
@@ -1169,7 +1169,7 @@ _gf_msg_nomem (const char *domain, const char *file,
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
if (!domain || !file || !function) {
@@ -2038,7 +2038,7 @@ _gf_msg (const char *domain, const char *file, const char *function,
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
if (trace) {
@@ -2119,7 +2119,7 @@ _gf_log (const char *domain, const char *file, const char *function, int line,
if (this->loglevel && (level > this->loglevel))
goto out;
}
- if (level > ctx->log.loglevel)
+ if (level > ctx->log.loglevel || level == GF_LOG_NONE)
goto out;
static char *level_strings[] = {"", /* NONE */