alti3/litestar-skills/litestar-logging
Claude Code and agent skill by alti3/litestar-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Configure Litestar logging with `LoggingConfig`, `queue_listener`, exception logging policy, selective stack-trace suppression, standard logging, picologging, Structlog, and custom logging config subclasses. Use when establishing or refactoring application logging behavior, request-level logs, or production-safe error logging in Litestar. Do not use for metrics/tracing instrumentation or exception-response contract design.
Install
npx vskill@latest install alti3/litestar-skills/litestar-loggingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as alti3/litestar-skills/litestar-logging.
Logging
Execution Workflow
- Choose the logging backend first: stdlib logging, picologging, Structlog, or a custom config subclass.
- Configure logging once at app setup with
logging_configor the Structlog plugin. - Use Litestar's non-blocking
queue_listenerhandler unless a concrete reason requires otherwise. - Decide when exceptions should be logged and which stack traces should be suppressed.
- Standardize request and app logger usage so fields, levels, and redaction rules stay consistent.
- Validate that logs remain actionable without leaking sensitive data.
Core Rules
- Keep logging configuration centralized at app construction.
- Prefer the built-in non-blocking
queue_listenerhandler for async applications. - Treat exception logging policy as an explicit decision; Litestar does not log exceptions by default outside debug mode.
- Use
disable_stack_tracefor expected exception types or status codes that should not spam traces. - Keep secrets, auth material, and sensitive request data out of logs.
- Avoid duplicate logging across middleware, exception handlers, and business code.
- Keep logging concerns separate from metrics and tracing.
Decision Guide
- Use
LoggingConfigfor standard logging or picologging-based setups. - Use
logging_module="picologging"when picologging is the desired backend. - Use
StructlogPluginwhen structured logging with Structlog is the project standard. - Use
log_exceptions="always"when production incidents require exception logs even outside debug mode. - Use
disable_stack_tracefor common expected errors such as404or domain-level validation problems. - Subclass
BaseLoggingConfigonly when the built-in configs cannot express the needed behavior.
Reference Files
Read only the sections you need:
- For stdlib logging, picologging, logger access, and custom config subclassing, read references/configuration-patterns.md.
- For exception logging, stack-trace suppression, Structlog, and redaction-oriented guidance, read references/exception-and-structlog-patterns.md.
Recommended Defaults
- Keep root level, handler choice, and formatter shape explicit.
- Use
request.loggerfor request-scoped logs and one shared app logger for app-level events. - Log exceptions intentionally instead of assuming Litestar will do it for you.
- Suppress traces only for expected, high-volume failures.
- Keep message fields and key names stable for searchability.
Anti-Patterns
- Writing blocking log handlers into async request paths when
queue_listenerwould suffice. - Logging secrets, tokens, or raw sensitive payloads.
- Logging the same failure at multiple layers without adding new context.
- Enabling stack traces for high-volume expected failures that operators already understand.
- Subclassing logging config before exhausting built-in options.
Validation Checklist
- Confirm logging is configured exactly once.
- Confirm request and app loggers emit at the intended levels.
- Confirm
log_exceptionsanddisable_stack_tracematch the incident policy. - Confirm secrets and sensitive request fields are absent or redacted.
- Confirm queue-based handlers or equivalent non-blocking behavior are in place.
- Confirm structured logging output matches downstream log ingestion expectations.
Cross-Skill Handoffs
- Use
litestar-metricsfor quantitative observability and scrape/export concerns. - Use
litestar-exception-handlingfor client-facing error contracts separate from logging behavior. - Use
litestar-debuggingfor incident-driven troubleshooting workflows. - Use
litestar-securitywhen logging policy intersects with secrets, auth context, or redaction requirements.
Litestar References
- https://docs.litestar.dev/latest/usage/logging.html
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/litestar/skills/litestar-logging/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alti3/litestar-skills/litestar-logging)