Skip to content
Back to skills

Logging Best Practices

ASecurity

Structured logging with structlog correlation IDs and rotation

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
ai-agentspythongo

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill logging-best-practices --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Logging Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-logging-best-practices/badge)](https://www.skillsdirectory.com/skills/loopyluci-logging-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.