mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 05:50:36 +00:00
test: add log setup workaround for tests
This commit is contained in:
@@ -197,14 +197,17 @@ def setup_logging(config: Config) -> None:
|
||||
Process -v/--verbose, --logfile options
|
||||
"""
|
||||
verbosity = config["verbosity"]
|
||||
if not config.get("ft_tests_skip_logging"):
|
||||
log_config = _create_log_config(config)
|
||||
_set_log_levels(
|
||||
log_config, verbosity, config.get("api_server", {}).get("verbosity", "info")
|
||||
)
|
||||
|
||||
log_config = _create_log_config(config)
|
||||
_set_log_levels(log_config, verbosity, config.get("api_server", {}).get("verbosity", "info"))
|
||||
|
||||
logging.config.dictConfig(log_config)
|
||||
logging.config.dictConfig(log_config)
|
||||
|
||||
# Add buffer handler to root logger
|
||||
logging.root.addHandler(bufferHandler)
|
||||
if bufferHandler not in logging.root.handlers:
|
||||
logging.root.addHandler(bufferHandler)
|
||||
|
||||
# Set color system for console output
|
||||
if config.get("print_colorized", True):
|
||||
|
||||
@@ -644,6 +644,7 @@ def get_default_conf(testdatadir):
|
||||
"trading_mode": "spot",
|
||||
"margin_mode": "",
|
||||
"candle_type_def": CandleType.SPOT,
|
||||
"ft_tests_skip_logging": True,
|
||||
}
|
||||
return configuration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user