diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-08-03 17:52:20 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-09-14 00:07:47 -0700 |
commit | b64ac3c83240c97794c67566d9e054d6c9681ecc (patch) | |
tree | d1aa3a6597d049e833bbfea1470906cdf69ceb56 /geo-replication/syncdaemon/syncdutils.py | |
parent | a9ee05a6673486ef86f36a87e00d144cfb56cf9b (diff) |
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 <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Kotresh HR <khiremat@redhat.com>
BUG: 1374610
Change-Id: Ida714931129f6a1331b9d0815da77efcb2b898e3
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/15450
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
-rw-r--r-- | geo-replication/syncdaemon/syncdutils.py | 17 |
1 files changed, 17 insertions, 0 deletions
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) |