From cf3881112646b58961124ea523b87f2c760d6a46 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 27 Dec 2012 13:21:56 -0800 Subject: [PATCH] don't special case 'latency' in default CLI rendering of log records --- CHANGES.md | 18 ++++++++++++++++-- bin/bunyan | 5 ----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1d86474..8917dfb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,8 +8,22 @@ Known issues: ## bunyan 0.16.9 (not yet released) -- *Exit* on EPIPE, otherwise we sit there useless processing a huge log file - with, e.g. `bunyan huge.log | head`. +- Tweak to CLI default pretty output: don't special case "latency" field. + The special casing was perhaps nice, but less self-explanatory. + Before: + + [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz) + GET /foo + ... + + After: + + [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15) + GET /foo + ... + +- *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log + file with, e.g. `bunyan huge.log | head`. ## bunyan 0.16.8 diff --git a/bin/bunyan b/bin/bunyan index 47e045e..44bfa66 100755 --- a/bin/bunyan +++ b/bin/bunyan @@ -703,11 +703,6 @@ function emitRecord(rec, line, opts, stylize) { } delete rec.req_id; - if (rec.latency) { - extras.push(rec.latency + "ms"); - } - delete rec.latency; - var onelineMsg; if (rec.msg.indexOf('\n') !== -1) { onelineMsg = '';