Skip to content

Commit e1c8cb0

Browse files
authored
Use FileLogHandler by default, CompositeLogHandler only with --verbose (#594)
1 parent aec6fcc commit e1c8cb0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lean/commands/research.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ def research(project: Path,
112112
environment_name = "backtesting"
113113
lean_config_manager = container.lean_config_manager
114114
lean_config = lean_config_manager.get_complete_lean_config(environment_name, algorithm_file, None)
115+
116+
# If --verbose is given, we use the CompositeLogHandler
117+
if container.logger.debug_logging_enabled:
118+
lean_config["log-handler"] = "QuantConnect.Logging.CompositeLogHandler"
119+
else:
120+
lean_config["log-handler"] = "QuantConnect.Logging.FileLogHandler"
121+
115122
lean_config["composer-dll-directory"] = LEAN_ROOT_PATH
116123
lean_config["research-object-store-name"] = algorithm_name
117124

0 commit comments

Comments
 (0)