aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs/manager.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-09-29 22:58:54 +0800
committerAaron LI <aaronly.me@outlook.com>2016-09-29 22:58:54 +0800
commit89cb413cc1fe1495665acc090f286ec42bcaa5bb (patch)
treea31468254b549eb58eae050842face3c98f0d122 /fg21sim/configs/manager.py
parent20081ab8a88a42e57644d729345ec75aee3da132 (diff)
downloadfg21sim-89cb413cc1fe1495665acc090f286ec42bcaa5bb.tar.bz2
utils/logging: reset handlers before initialization/reconfiguration
Also improve the comments.
Diffstat (limited to 'fg21sim/configs/manager.py')
-rw-r--r--fg21sim/configs/manager.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py
index f5465a9..a889259 100644
--- a/fg21sim/configs/manager.py
+++ b/fg21sim/configs/manager.py
@@ -84,7 +84,13 @@ class ConfigManager:
@property
def logging(self):
"""Get and prepare the logging configurations for
- `logging.basicConfig()`
+ ``logging.basicConfig()`` to initialize the logging module.
+
+ NOTE
+ ----
+ ``basicConfig()`` will automatically create a ``Formatter`` with
+ the giving ``format`` and ``datefmt`` for each handlers if necessary,
+ and then adding the handlers to the "root" logger.
"""
from logging import FileHandler, StreamHandler
conf = self.get("logging")