Structured logging with structlog correlation IDs and rotation
Scanned 9/10/2026
Install to Claude Code
npx -y skills add LoopyLuci/Skills --skill logging-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Logging Best Practices?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/loopyluci-logging-best-practices)More formats (shields.io, HTML) on the badges page.
---
name: logging-best-practices
description: "Structured logging with structlog correlation IDs and rotation"
---
# Logging Best Practices
## Structured Logging
```python
import structlog
structlog.configure(
processors=[
structlog.processors.TimeStamper(fmt="iso"),
structlog.dev.ConsoleRenderer()
]
)
log = structlog.get_logger()
log.info("request", method="GET", path="/users", status=200)
```
## Log Rotation
```ini
# /etc/logrotate.d/myapp
/var/log/myapp/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
copytruncate
}
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!