CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/structured-logging

Every backend service MUST use structured logging — pino/structlog/slog, JSON format, request IDs, proper log levels. console.log is never acceptable.

88

3.03x
Quality

85%

Does it follow best practices?

Impact

97%

3.03x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

use-structured-logger.jsonverifiers/

{
  "instruction": "Use a structured logging library instead of console.log/print in every backend service",
  "relevant_when": "Agent creates or modifies a Node.js, Python, or Go backend application, API, or background worker",
  "context": "Every production backend service must use structured logging from day one. console.log, print, and fmt.Println produce unstructured, unqueryable output. A structured logger (pino for Node.js, structlog for Python, slog for Go) produces JSON with levels, timestamps, and contextual fields. This is non-negotiable for any backend code.",
  "sources": [
    {
      "type": "file",
      "filename": "skills/structured-logging/SKILL.md",
      "tile": "tessl-labs/structured-logging@0.2.0"
    }
  ],
  "checklist": [
    {
      "name": "structured-logger-installed",
      "rule": "Agent installs and uses a structured logging library (pino, winston, structlog, python-json-logger, slog) rather than console.log, print, or fmt.Println. No bare console.log/print/fmt.Println calls should remain in application code.",
      "relevant_when": "Agent creates or modifies any backend service, API, or worker"
    },
    {
      "name": "json-log-format",
      "rule": "Logger is configured to output JSON-formatted log lines suitable for log aggregation in production",
      "relevant_when": "Agent configures a logging library"
    },
    {
      "name": "log-levels-used-correctly",
      "rule": "Agent uses appropriate log levels: error only for unexpected failures, warn for handled but unexpected conditions (404, validation failures), info for business events, debug for development details",
      "relevant_when": "Agent writes log statements"
    },
    {
      "name": "log-level-env-var",
      "rule": "Log level is configurable via a LOG_LEVEL environment variable with a sensible default (info)",
      "relevant_when": "Agent initializes a logger"
    },
    {
      "name": "no-sensitive-data-logged",
      "rule": "Log statements do not include passwords, tokens, API keys, credit card numbers, or other PII/secrets",
      "relevant_when": "Agent writes log statements that reference user input or credentials"
    },
    {
      "name": "startup-shutdown-logged",
      "rule": "Application startup and graceful shutdown are logged using the structured logger",
      "relevant_when": "Agent creates server initialization or shutdown code"
    }
  ]
}

tile.json