Skip to content

feat: integrate litestar StructlogPlugin for request.logger support#78

Merged
lesnik512 merged 1 commit intomainfrom
53-try-litestar-structlog-plugin
Apr 29, 2026
Merged

feat: integrate litestar StructlogPlugin for request.logger support#78
lesnik512 merged 1 commit intomainfrom
53-try-litestar-structlog-plugin

Conversation

@lesnik512
Copy link
Copy Markdown
Member

  • Extract structlog_processors and memory_logger_factory properties on LoggingInstrument to avoid duplication across bootstrappers
  • Override LitestarLoggingInstrument.bootstrap() to register StructlogPlugin with our processors and MemoryLoggerFactory, enabling request.logger in route handlers
  • Document Structlog Litestar integration in configuration and litestar integration pages

- Extract structlog_processors and memory_logger_factory properties on
  LoggingInstrument to avoid duplication across bootstrappers
- Override LitestarLoggingInstrument.bootstrap() to register
  StructlogPlugin with our processors and MemoryLoggerFactory, enabling
  request.logger in route handlers
- Document Structlog Litestar integration in configuration and litestar
  integration pages
@lesnik512 lesnik512 self-assigned this Apr 29, 2026
@lesnik512 lesnik512 linked an issue Apr 29, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...e_bootstrap/bootstrappers/litestar_bootstrapper.py 100.00% <100.00%> (ø)
lite_bootstrap/instruments/logging_instrument.py 100.00% <100.00%> (ø)
tests/test_litestar_bootstrap.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lesnik512 lesnik512 merged commit 65fcbd2 into main Apr 29, 2026
13 of 14 checks passed
@lesnik512 lesnik512 deleted the 53-try-litestar-structlog-plugin branch April 29, 2026 07: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.

Try litestar structlog plugin

1 participant