Bug 846201 - Log levels stuck at TRACE
Log levels stuck at TRACE
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: core (Show other bugs)
mainline
Unspecified Unspecified
urgent Severity unspecified
: ---
: ---
Assigned To: Amar Tumballi
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-07 02:24 EDT by Kaushal
Modified: 2013-12-18 19:08 EST (History)
2 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 14:03:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kaushal 2012-08-07 02:24:42 EDT
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 02:27:44 EDT
Wrong git change id. It is 87d453f7211d3a38113aea895947143ea8bf7d68.
Comment 2 Amar Tumballi 2012-08-07 02:44:04 EDT
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 13:42:30 EDT
patch committed -  http://review.gluster.com/3786

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