Debuggability

Logs are a user interface

Someone will read your logs at 2 a.m. Design for that person.

~5 minCoding
scroll
01 · the shape

Logs without context are confetti

A line that says "failed" is technically a log and practically useless. The future reader needs who, what, where, why now, and which request ties it together.

logs · before and after

The useful signal is usually already there.

change looks calm

A tiny patch rarely touches only one thing. Push it and watch the review surface appear.

02 · the move

Log facts, not panic

Use structured fields for ids, state, attempt counts, durations, and decision points. Avoid logging secrets, blobs, or poetic stack traces with no handle.

logger.info.js

Structured logs are easier to search, alert, and join.

03 · the check

Sample the noisy path

Logs should explain rare failures without drowning normal traffic. Put more context near state transitions and fewer words in hot loops.

change confidence lab
guessy
safe0
fragile: this change still depends on hope and a lucky deploy

Flip the switches and watch the story turn into a tiny operating model.

0fields often beat one long sentence
0request id on every line
0tokens or passwords in logs
04 · the takeaway

Write logs for the operator

Good logs are an interface between past code and present panic. Make them humane.

source trail