logging

SKILL.md

Logging

Use this skill when adding or standardizing logs across a Litestar app.

Workflow

  1. Configure logging_config at app creation.
  2. Define environment-specific log levels/handlers.
  3. Add request correlation IDs and consistent event fields.
  4. Keep sensitive payloads and secrets out of logs.

Pattern

from litestar import Litestar
from litestar.logging import LoggingConfig

app = Litestar(
    route_handlers=[],
    logging_config=LoggingConfig(),
)

Logging Checklist

  • Use structured logs in production.
  • Include operation name, request ID, and status.
  • Avoid duplicate logging between middleware and handlers.
  • Reserve stack traces for actionable failure points.

Litestar References

Weekly Installs
1
GitHub Stars
5
First Seen
14 days ago
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1