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.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/plip/basic/logger.py b/plip/basic/logger.py
deleted file mode 100644
index ca65411..0000000
--- a/plip/basic/logger.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import inspect
-import logging
-
-
-def get_logger():
- """
- Configures a base logger and returns a module-specific sub-logger of the calling module.
- """
- frame = inspect.stack()[1]
- module_name = inspect.getmodule(frame[0]).__name__
- 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')
- ch.setFormatter(formatter)
- logger.parent.addHandler(ch)
- else:
- logger = logging.getLogger('plip')
-
- return logger