How to format json structured log entries for readable analysis
- Step 1Copy the compact log line — Copy the NDJSON log line directly from your terminal, log file, or observability platform. Pino output looks like: {"level":30,"time":1234567890,"msg":"request completed","req":{"method":"GET","url":"/api/users"}}.
- Step 2Prettify to reveal nested structure — Paste the log line and prettify. The nested req, res, err, and context objects become readable at a glance, revealing the full request/response context and any nested error stack traces.
- Step 3Use pino-pretty for terminal output — For development log formatting in the terminal, pipe Pino output through pino-pretty: node app.js | npx pino-pretty. This formats logs in real time without needing to copy and paste.
- Step 4For incident analysis: format the error object — Focus on the err or error field in the log entry. Prettify the nested error object to see the message, type, stack trace, and any additional context properties that diagnose the root cause.
Frequently asked questions
How do I read Pino log levels in prettified output?+
Pino encodes log levels as integers: 10=trace, 20=debug, 30=info, 40=warn, 50=error, 60=fatal. The prettified log shows level: 50 for an error. pino-pretty converts these integers to human-readable labels. For manual analysis, the level integer is in the prettified output and easy to read.
How do I format logs from AWS CloudWatch?+
CloudWatch Insights returns log events as JSON. Copy the message field value (which is the original JSON log string) and prettify it here. CloudWatch's Insights query language can also format JSON log fields using the display command: display @timestamp, level, msg | sort @timestamp desc.
Is the log data — including error messages and trace IDs — transmitted to JAD Apps?+
No. Formatting runs entirely in your browser. Log entries, error messages, and trace IDs are never transmitted to JAD Apps servers.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.