Bug 846201 - Log levels stuck at TRACE
Summary: Log levels stuck at TRACE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-07 06:24 UTC by Kaushal
Modified: 2013-12-19 00:08 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 18:03:38 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.