Bug 846201

Summary: Log levels stuck at TRACE
Product: [Community] GlusterFS Reporter: Kaushal <kaushal>
Component: coreAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: urgent    
Version: mainlineCC: gluster-bugs, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 18:03:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kaushal 2012-08-07 06:24:42 UTC
Some recent changes seems to have caused the log-level to be stuck at TRACE. The default is at TRACE and changing log-levels also does not work.
I'm on change 5070aa3973066ba7347b14b4b993dcde11e08165. It is still the case on HEAD.

Comment 1 Kaushal 2012-08-07 06:27:44 UTC
Wrong git change id. It is 87d453f7211d3a38113aea895947143ea8bf7d68.

Comment 2 Amar Tumballi 2012-08-07 06:44:04 UTC
below patch fixes the issue.

--------------
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 40981b5..7856087 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 */
-----------------

Comment 3 Amar Tumballi 2012-08-07 17:42:30 UTC
patch committed -  http://review.gluster.com/3786