aboutsummaryrefslogtreecommitdiff
path: root/plip/basic/logger.py
diff options
context:
space:
mode:
Diffstat (limited to 'plip/basic/logger.py')
-rw-r--r--plip/basic/logger.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/plip/basic/logger.py b/plip/basic/logger.py
index ca65411..f15650e 100644
--- a/plip/basic/logger.py
+++ b/plip/basic/logger.py
@@ -8,14 +8,16 @@ def get_logger():
"""
frame = inspect.stack()[1]
module_name = inspect.getmodule(frame[0]).__name__
- if module_name != '__main__':
+ if module_name != "__main__":
logger = logging.getLogger(module_name)
if not logger.parent.handlers:
ch = logging.StreamHandler()
- formatter = logging.Formatter('%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d] %(name)s: %(message)s')
+ formatter = logging.Formatter(
+ "%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d] %(name)s: %(message)s"
+ )
ch.setFormatter(formatter)
logger.parent.addHandler(ch)
else:
- logger = logging.getLogger('plip')
+ logger = logging.getLogger("plip")
return logger