Skip to content

Restore the LogEntry based SaveLogs signature - #9658

Merged
jhonabreul merged 1 commit into
QuantConnect:masterfrom
jhonabreul:bug-restore-save-logs-signature
Aug 7, 2026
Merged

Restore the LogEntry based SaveLogs signature#9658
jhonabreul merged 1 commit into
QuantConnect:masterfrom
jhonabreul:bug-restore-save-logs-signature

Conversation

@jhonabreul

@jhonabreul jhonabreul commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description

PR #9632 split BaseResultsHandler.SaveLogs into two overloads (List<LogEntry> and IEnumerable<string>) so BacktestingResultHandler.Exit() could reuse the message-list clone. This restores the original public API:

  • BaseResultsHandler.SaveLogs(string id, List<LogEntry> logs) is again the single overload, writing the entry messages itself.
  • BacktestingResultHandler.Exit() clones the LogEntry list under the log store lock and passes it to SaveLogs, as it did before Run a reduced results analysis periodically during backtests #9632.
  • CloneLogs() stays for the final-result and in-run analysis paths, which need the message strings.

Related Issue

N/A

Motivation and Context

SaveLogs is a public virtual member that result handler implementations override; its signature should not have changed as a side effect of #9632.

Requires Documentation Change

N/A

How Has This Been Tested?

  • BaseResultsHandlerTests, BacktestingResultHandlerTests and LiveTradingResultHandlerTests: 31 passed.
  • Manual Launcher run of an algorithm logging on every bar: BacktestingResultHandler.Exit() saved the complete log file (launch line, 390 bar lines, end-of-algorithm line, completion line) at the end of the backtest.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes (no new tests: restores the pre-Run a reduced results analysis periodically during backtests #9632 signature, already covered by the existing result handler fixtures).
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@jhonabreul
jhonabreul marked this pull request as ready for review August 6, 2026 23:12
@jhonabreul
jhonabreul merged commit c6cc3b7 into QuantConnect:master Aug 7, 2026
8 checks passed
@jhonabreul
jhonabreul deleted the bug-restore-save-logs-signature branch August 7, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants