diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-08-03 17:52:20 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-09-13 04:58:43 -0700 |
commit | 972eb0104f2b93207200c7c3761e65fef589069c (patch) | |
tree | 88325e14c6c6ca0e5b099ade7d5454f2f8224702 /geo-replication/syncdaemon/syncdutils.py | |
parent | bc000f046cb7f3614b2b6b640176ae41e0fcb633 (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: 1374606
Change-Id: Ida714931129f6a1331b9d0815da77efcb2b898e3
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/15449
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
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) |