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

criteria.jsonevals/scenario-2/

{
  "context": "Tests whether the agent proactively sets up structured logging in a background job processor. The task describes only business requirements for a job queue consumer -- it never mentions logging libraries, pino, JSON logs, or log levels. A production worker that runs unattended needs structured logging even more than an API server.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Structured logger used (not console.log)",
      "description": "Uses pino, winston, or another structured logging library for all output. No bare console.log or console.error calls in the application code.",
      "max_score": 15
    },
    {
      "name": "Job ID correlation in logs",
      "description": "Log entries for job processing include the job_id field -- achieved via child logger per job or by passing job_id as a structured field in every log call during job execution.",
      "max_score": 12
    },
    {
      "name": "Job lifecycle logged",
      "description": "Each job's lifecycle is logged: job_started (or processing_started) and job_completed/job_failed events are logged with structured fields including job_id, job type, and duration.",
      "max_score": 12
    },
    {
      "name": "Startup logged with structured logger",
      "description": "Processor startup is logged using the structured logger (not console.log), including relevant context like queue name or configuration.",
      "max_score": 8
    },
    {
      "name": "Shutdown logged with structured logger",
      "description": "Graceful shutdown is logged using the structured logger, including summary counts (processed, failed) as structured fields.",
      "max_score": 8
    },
    {
      "name": "Error logging with context",
      "description": "Failed jobs are logged at error or warn level with relevant context (job_id, job type, reason for failure) as structured fields -- not just a bare error message string.",
      "max_score": 10
    },
    {
      "name": "Log levels used correctly",
      "description": "Uses appropriate log levels: info for successful job completion and startup, error or warn for failures, not a single level for everything.",
      "max_score": 10
    },
    {
      "name": "No sensitive data logged",
      "description": "recipient_email and template_data contents are not logged wholesale at info level. Job IDs and types are fine, but email addresses and template contents are PII.",
      "max_score": 8
    },
    {
      "name": "Log level configurable via environment variable",
      "description": "Logger level is set from an environment variable (e.g. LOG_LEVEL) with a sensible default.",
      "max_score": 7
    },
    {
      "name": "JSON log output",
      "description": "Logger is configured to produce JSON-formatted output suitable for log aggregation.",
      "max_score": 5
    },
    {
      "name": "Structured fields not string interpolation",
      "description": "Log calls pass data as separate key-value fields rather than string interpolation or concatenation.",
      "max_score": 5
    }
  ]
}

evals

tile.json