From 8c0be8ae35b6beea2fbee81f554c168c0bb01729 Mon Sep 17 00:00:00 2001 From: Josue Nina Date: Fri, 26 Sep 2025 15:19:34 -0500 Subject: [PATCH] Use FileLogHandler by default, CompositeLogHandler only with --verbose --- lean/commands/research.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lean/commands/research.py b/lean/commands/research.py index 9d962326..018c618c 100644 --- a/lean/commands/research.py +++ b/lean/commands/research.py @@ -112,6 +112,13 @@ def research(project: Path, environment_name = "backtesting" lean_config_manager = container.lean_config_manager lean_config = lean_config_manager.get_complete_lean_config(environment_name, algorithm_file, None) + + # If --verbose is given, we use the CompositeLogHandler + if container.logger.debug_logging_enabled: + lean_config["log-handler"] = "QuantConnect.Logging.CompositeLogHandler" + else: + lean_config["log-handler"] = "QuantConnect.Logging.FileLogHandler" + lean_config["composer-dll-directory"] = LEAN_ROOT_PATH lean_config["research-object-store-name"] = algorithm_name