From ea39bf03a585033059571eee0d590f70e3171b4f Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 28 Feb 2012 14:45:53 -0800 Subject: [PATCH] Bunyan CLI tweak to show an 'err' field that doesn't have a 'stack'. --- CHANGES.md | 4 +++- bin/bunyan | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8ca8826..926d701 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,9 @@ ## bunyan 0.6.9 (not yet released) -(nothing yet) +- Tweak `bunyan` CLI default output to still show an "err" field if it doesn't + have a "stack" attribute. + ## bunyan 0.6.8 diff --git a/bin/bunyan b/bin/bunyan index 5494e55..f89d9b7 100755 --- a/bin/bunyan +++ b/bin/bunyan @@ -455,8 +455,8 @@ function handleLogLine(line, opts, stylize) { if (rec.err && rec.err.stack) { details.push(indent(rec.err.stack)) + delete rec.err; } - delete rec.err; var leftover = Object.keys(rec); for (var i = 0; i < leftover.length; i++) {