gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-taler-util] 12/51: make map static


From: gnunet
Subject: [GNUnet-SVN] [taler-taler-util] 12/51: make map static
Date: Mon, 23 Sep 2019 22:02:03 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository taler-util.

commit 7c441183512c1d9325bdc362db8cba5af260a99f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Feb 4 18:05:47 2019 +0100

    make map static
---
 python/log/gnunet_log.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/python/log/gnunet_log.py b/python/log/gnunet_log.py
index 32b49a7..6ab88ee 100755
--- a/python/log/gnunet_log.py
+++ b/python/log/gnunet_log.py
@@ -12,6 +12,11 @@ class GnunetLogger:
     INFO = logging.INFO
     DEBUG = logging.DEBUG
 
+    level_map = {"ERROR": logging.ERROR,
+                 "WARNING": logging.WARNING,
+                 "INFO": logging.INFO,
+                 "DEBUG": logging.DEBUG}
+
     def __init__(self, component, loglevel):
         self.component = component
         # loglevel set at "compile time".
@@ -19,11 +24,6 @@ class GnunetLogger:
         logging.basicConfig(level=loglevel)
         self.logger = logging.getLogger(component)
 
-        self.level_map = {"ERROR": logging.ERROR,
-                          "WARNING": logging.WARNING,
-                          "INFO": logging.INFO,
-                          "DEBUG": logging.DEBUG}
-
     def __internal_log(self, message, message_loglevel, ruling_loglevel):
 
         if not ruling_loglevel:
@@ -61,4 +61,4 @@ class GnunetLogger:
             # for simplicity, and for now, we supersede the check
             # of the 'file', 'function' and 'from line [to line]' bits.
             # Just check the loglevel.
-            self.__internal_log(message, loglevel, 
self.level_map.get(gfl_split_split[4]))
+            self.__internal_log(message, loglevel, 
GnunetLogger.level_map.get(gfl_split_split[4]))

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]