1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 22:36:55 +08:00

Remove set_log_basic_config, refine count_parameters, rename root_uri as get_local_dir

This commit is contained in:
D-X-Y
2021-03-11 02:33:00 +00:00
parent e061443560
commit f6ed175070
4 changed files with 33 additions and 33 deletions

View File

@@ -108,27 +108,6 @@ def set_log_with_config(log_config: Dict[Text, Any]):
logging_config.dictConfig(log_config)
def set_log_basic_config(filename: Optional[Text] = None, format: Optional[Text] = None, level: Optional[int] = None):
"""
Set the basic configuration for the logging system.
See details at https://docs.python.org/3/library/logging.html#logging.basicConfig
:param filename: str or None
The path to save the logs.
:param format: the logging format
:param level: int
:return: Logger
Logger object.
"""
if level is None:
level = C.logging_level
if format is None:
format = C.logging_config["formatters"]["logger_format"]["format"]
logging.basicConfig(filename=filename, format=format, level=level)
class LogFilter(logging.Filter):
def __init__(self, param=None):
self.param = param