Source code Stability

Console.log-only / no structured logger

Part of the Observability gaps check · fix arrives as a guide

What it is

The application logs with console.log rather than a structured logger, so log lines are free text with no consistent fields or levels.

Why it matters

You cannot query free text reliably. Filtering by severity, tenant, or request becomes string matching, and the fields you need during an incident are the ones that were interpolated into a sentence.

How to fix it

Adopt a structured logger — Pino, Winston, or your platform's — emitting JSON with a level, a message, and context fields. Set the level from the environment so production is not paying to store debug output.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.