[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.
- [GNUnet-SVN] [taler-taler-util] 08/51: Update python config module., (continued)
- [GNUnet-SVN] [taler-taler-util] 08/51: Update python config module., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 09/51: empty module, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 03/51: amount version 0.1. Basically has some new exceptions, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 10/51: Very first draft for solving #4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 05/51: First commit for #4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 02/51: adding amount lib, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 04/51: add talerconfig and linted amount, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 06/51: remove old config, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 07/51: Update "config" module (with one that implements @INLINE@)., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 14/51: log test, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 12/51: make map static,
gnunet <=
- [GNUnet-SVN] [taler-taler-util] 25/51: 4453. Parsing line interval., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 11/51: Towards a usable solution for #4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 13/51: Give loglevels dedicate class + test., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 16/51: Updating Amount from bank., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 19/51: Parsing GNUNET_FORCE_LOGFILE., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 26/51: 4453. Check against further fields (filename, func, lineno), gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 17/51: 4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 24/51: fix filename extraction., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 18/51: 4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 20/51: 4453., gnunet, 2019/09/23