원클릭으로
logging
Implement structured, secure logging with proper levels, correlation IDs, and redaction
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Implement structured, secure logging with proper levels, correlation IDs, and redaction
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Execute safe Git workflows — branching, committing, resolving conflicts, and managing PRs
Use when controlling AI spend, token budgets, model routing, or workflow efficiency before scaling usage
Use when handling incidents, outages, severe regressions, or operational emergencies before attempting broad fixes
Use when investigating latency, throughput, resource saturation, or performance regressions before changing implementation details
Use when reviewing code, preparing a PR for review, or processing review feedback
Use when diagnosing bugs, test failures, or unexpected behavior before attempting any fix
SOC 직업 분류 기준
| name | logging |
| description | Implement structured, secure logging with proper levels, correlation IDs, and redaction |
Implement effective logging — structured format, appropriate levels, correlation IDs, and sensitive data protection.
Use a logging library that supports structured (JSON) output — not console.log.
| Language | Library |
|---|---|
| JavaScript/TS | pino, winston |
| Python | structlog, python-json-logger |
| Go | zerolog, zap |
| Java | SLF4J + Logback |
| Level | When | Example |
|---|---|---|
error | Unexpected failure | Database connection lost |
warn | Concerning but handled | Retry succeeded |
info | Business events | User registered |
debug | Dev details (off in prod) | Function parameters |
Every request should carry a unique ID through all log entries:
// Generate at entry point
const requestId = req.headers['x-request-id'] || uuid()
// Include in all logs
logger.info('Order processed', { requestId, orderId, userId })
Never log: passwords, tokens, API keys, PII, credit card numbers
// BAD
logger.info('Login', { email, password })
// GOOD
logger.info('Login', { email, passwordProvided: !!password })
| Setting | Development | Production |
|---|---|---|
| Level | debug | info |
| Format | Pretty printed | JSON |
| Output | Console | Log aggregator |
| Signal | Action |
|---|---|
| Secrets appearing in logs | Add redaction immediately |
console.log in production code | Replace with structured logger |
| Debug logging enabled in production | Set level to info or higher |
| Error logged AND re-thrown | Choose one — log or throw |
| Skill | When |
|---|---|
| debugging | Using logs to debug issues |
| secure-coding | Ensuring logs don't leak data |