Fix config["log_config"] use so it doesn't break in backtesting

The issue as that `logging.config.dictConfig(log_config)` ends up using the dictionary in place and including non-picklable items (saw an RLock), blowing up backtesting.
This commit is contained in:
Oliver Bristow
2025-04-15 15:55:57 +01:00
parent 841f57800e
commit 3e2a799d9f

View File

@@ -123,7 +123,7 @@ def _add_formatter(log_config: dict[str, Any], format_name: str, format_: str):
def _create_log_config(config: Config) -> dict[str, Any]:
# Get log_config from user config or use default
log_config = config.get("log_config", deepcopy(FT_LOGGING_CONFIG))
log_config = deepcopy(config.get("log_config", FT_LOGGING_CONFIG))
if logfile := config.get("logfile"):
s = logfile.split(":")