From 972eb0104f2b93207200c7c3761e65fef589069c Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Wed, 3 Aug 2016 17:52:20 +0530 Subject: geo-rep: Use configured log_level for libgfchangelog logs libgfchangelog was not respecting the log_level configured in Geo-replication. With this patch Libgfchangelog log level can be configured using `config changelog_log_level TRACE`. Default Changelog log level is INFO > Reviewed-on: http://review.gluster.org/15078 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Reviewed-by: Kotresh HR BUG: 1374606 Change-Id: Ida714931129f6a1331b9d0815da77efcb2b898e3 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/15449 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Saravanakumar Arumugam CentOS-regression: Gluster Build System --- geo-replication/syncdaemon/syncdutils.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'geo-replication/syncdaemon/syncdutils.py') diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index 40eff050a9e..987e1bf186e 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -506,3 +506,20 @@ class ChangelogHistoryNotAvailable(Exception): class ChangelogException(OSError): pass + + +class GlusterLogLevel(object): + NONE = 0 + EMERG = 1 + ALERT = 2 + CRITICAL = 3 + ERROR = 4 + WARNING = 5 + NOTICE = 6 + INFO = 7 + DEBUG = 8 + TRACE = 9 + + +def get_changelog_log_level(lvl): + return getattr(GlusterLogLevel, lvl, GlusterLogLevel.INFO) -- cgit