Skip to content

fix(logging): close spdlog file handles before drop - #31

Merged
cloudQuant merged 1 commit into
devfrom
iteration41/spdlog-file-release
Sep 28, 2026
Merged

cloudQuant merged 1 commit into
devfrom
iteration41/spdlog-file-release

Conversation

@cloudQuant

Copy link
Copy Markdown
Owner

Summary

  • Close and unregister each spdlog logger before temporary-directory cleanup, rollover, or handler shutdown so Windows can release the file handle.
  • Probe spdlog through the same runtime availability check used by the backend selector, and skip symlink-only assertions when Windows policy denies symlink creation.
  • This change only manages log files; it adds no provider calls, broker writes, order/cancel dispatch, or private configuration.

Verification

  • python -m pytest -p no:asyncio tests/unit/utils/test_logging_split_files.py -q --tb=short — 53 passed, 4 skipped.
  • ruff check backtrader/utils/log_message.py tests/unit/utils/test_logging_split_files.py — passed.
  • git diff --check — passed.

@cloudQuant
cloudQuant merged commit 51b92fe into dev Sep 28, 2026
33 checks passed
@cloudQuant
cloudQuant deleted the iteration41/spdlog-file-release branch September 28, 2026 19:33
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