diff options
| author | Aravinda VK <avishwan@redhat.com> | 2016-08-03 17:52:20 +0530 |
|---|---|---|
| committer | Aravinda VK <avishwan@redhat.com> | 2016-09-14 23:29:47 -0700 |
| commit | bc1a6900be5ba9834c3744ae454f8beee242c1d4 (patch) | |
| tree | 5da5737693da37810288390a9e062b6991fd60d6 /geo-replication/syncdaemon/syncdutils.py | |
| parent | 31ad819d8ccfd7a78a6fc35b9e21b673597d7b93 (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: 1374608
Change-Id: Ida714931129f6a1331b9d0815da77efcb2b898e3
Signed-off-by: Aravinda VK <avishwan@redhat.com>
(cherry picked from commit f41ec4fcfaa9ca976fddbe9e91aabf840c20111f)
Reviewed-on: http://review.gluster.org/15444
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: Saravanakumar Arumugam <sarumuga@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 ea10fcb8817..8629850cd40 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -518,3 +518,20 @@ class ChangelogException(OSError): def gf_event(event_type, **kwargs): from events.gf_event import gf_event as gfevent gfevent(event_type, **kwargs) + + +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) |
