1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-12 15:26:54 +08:00

Fix logging_level: make logging level specified in qlib.init applies to all loggers (#1368)

* fix logging_level: make logging level specified in qlib.init apply to all loggers

* downgrade loglevel in expmanager __init__ to debug (it will be called in each process in multiprocessing operations such as read data)

* correct gramma error

* fix black lint

* use functor to cache loggers and set level

* correct black lint

* correct pylint

* correct pylint
This commit is contained in:
YQ Tsui
2022-11-29 08:09:22 +08:00
committed by GitHub
parent 4f5ae4d224
commit 6a47416a2d
7 changed files with 42 additions and 34 deletions

View File

@@ -411,8 +411,7 @@ class QlibConfig(Config):
if _logging_config:
set_log_with_config(_logging_config)
# FIXME: this logger ignored the level in config
logger = get_module_logger("Initialization", level=logging.INFO)
logger = get_module_logger("Initialization", kwargs.get("logging_level", self.logging_level))
logger.info(f"default_conf: {default_conf}.")
self.set_mode(default_conf)