Bug 1368882 - log level set in glfs_set_logging() does not work
Summary: log level set in glfs_set_logging() does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vijay Bellur
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks: 1378383 1378384
TreeView+ depends on / blocked
 
Reported: 2016-08-22 03:01 UTC by Vijay Bellur
Modified: 2017-03-07 06:10 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1378383 1378384 (view as bug list)
Environment:
Last Closed: 2017-03-07 06:10:50 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Vijay Bellur 2016-08-22 03:01:23 UTC
Description of problem:

When a consumer of libgfapi users glfs_set_logging() to set a log level value, the expectation is that log level for gluster would be set to that value. However the logs from gluster behave as if they are set to the default loglevel i.e. GF_LOG_INFO despite the api returning SUCCESS.


Version-Release number of selected component (if applicable): 


How reproducible: always



Steps to Reproduce:
1.Alter the gluster log level of a gfapi consumer using glfs_set_logging() to a value other than GF_LOG_INFO.

2. Observe the logs from gluster

Actual results:

All logs upto level GF_LOG_INFO are seen


Expected results:

Only logs pertaining to the appropriate level should be seen from gluster


Additional info:

Comment 1 Vijay Bellur 2016-08-22 03:04:09 UTC
REVIEW: http://review.gluster.org/15112 (logging: Avoid re-initing log level in io-stats) posted (#2) for review on master by Vijay Bellur (vbellur@redhat.com)

Comment 2 Worker Ant 2016-08-22 16:02:24 UTC
REVIEW: http://review.gluster.org/15112 (logging: Avoid re-initing log level in io-stats) posted (#3) for review on master by Vijay Bellur (vbellur@redhat.com)

Comment 3 Worker Ant 2016-08-23 18:57:38 UTC
COMMIT: http://review.gluster.org/15112 committed in master by Pranith Kumar Karampuri (pkarampu@redhat.com) 
------
commit 5ce748ca45c6f2f867819400f50c9cdc12604226
Author: Vijay Bellur <vbellur@redhat.com>
Date:   Mon Aug 8 13:11:29 2016 -0400

    logging: Avoid re-initing log level in io-stats
    
    If log level is already set via api or command line, initialization of
    io-stats xlator overwrites the log level to GF_LOG_INFO. This patch
    prevents re-initialization of log level if already set.
    
    Change-Id: I1f74d94ef8068b95ec696638c0a8b17d8d71aabe
    BUG: 1368882
    Signed-off-by: Vijay Bellur <vbellur@redhat.com>
    Reported-by: Colin Lord <clord@redhat.com>
    Reviewed-on: http://review.gluster.org/15112
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>


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