logging-best-practices — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited logging-best-practices (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Expert guidance for production-grade logging based on Boris Tane's loggingsucks.com philosophy.
Stop logging "what your code is doing." Start logging "what happened to this request."
Traditional logging is optimized for writing, not querying. Developers emit logs for immediate debugging convenience without considering how they'll be searched later. This creates massive signal-to-noise ratios at scale.
Instead of scattered log statements throughout your code, build one comprehensive event per request per service:
// ❌ Traditional scattered logging
logger.info("Request started");
logger.info(`User ${userId} found`);
logger.info("Fetching cart");
logger.debug(`Cart has ${items.length} items`);
logger.info("Processing payment");
logger.error(`Payment failed: ${error.message}`);
// ✅ Wide event - build throughout request, emit once
const event = {
request_id: req.id,
timestamp: Date.now(),
service: "checkout",
version: "2.3.1",
user: { id: userId, tier: "premium", account_age_days: 847 },
cart: { id: cartId, item_count: 3, total_cents: 15999 },
payment: { method: "card", provider: "stripe", latency_ms: 234 },
outcome: "failure",
error: { type: "PaymentDeclined", code: "card_declined", retriable: true }
};
logger.info(event);| Concept | Definition |
|---|---|
| Wide Event | One comprehensive, context-rich log per request per service |
| Cardinality | Number of unique values (user IDs = high, HTTP methods = low) |
| Dimensionality | Count of fields per event (aim for 40+ meaningful fields) |
| Tail Sampling | Sample decisions after request completion based on outcomes |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.