aboutsummaryrefslogtreecommitdiff
path: root/plip/basic/logger.py
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2020-07-07 14:55:17 +0000
committerGitHub <noreply@github.com>2020-07-07 14:55:17 +0000
commit0d135d611506e81d322596c7827b08bbfd3b7c08 (patch)
treea281b8e1f140ad3de77d818747fce03bcfa5b77b /plip/basic/logger.py
parent7059ee2a4ced23e467741cc846eb185886ffca38 (diff)
Format code with Blackdeepsource-transform-b65b5545
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