Atom.

Logging should be pretty - Tue Oct 2420234:35 AM

Logging should be pretty.

Human-friendly output

Why pretty? Because humans like pretty things.


But logging should also be structured.

Machine-friendly output

Why structured? For consistency... But also, take AWS CloudWatch for example. CloudWatch has some baked-in heuristic that parses say, Node.js logs, and auto detects key-value pairs if you’re logging JSON — both as literal object and as stringfied/serialized objects — and makes the fields available to query against.

Pictured above are the outputs for my TypeScript reimplementation of hashicorp/go-hclog.