don't special case 'latency' in default CLI rendering of log records
This commit is contained in:
parent
74d3935348
commit
cf38811126
2 changed files with 16 additions and 7 deletions
18
CHANGES.md
18
CHANGES.md
|
@ -8,8 +8,22 @@ Known issues:
|
||||||
|
|
||||||
## bunyan 0.16.9 (not yet released)
|
## bunyan 0.16.9 (not yet released)
|
||||||
|
|
||||||
- *Exit* on EPIPE, otherwise we sit there useless processing a huge log file
|
- Tweak to CLI default pretty output: don't special case "latency" field.
|
||||||
with, e.g. `bunyan huge.log | head`.
|
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
|
## bunyan 0.16.8
|
||||||
|
|
|
@ -703,11 +703,6 @@ function emitRecord(rec, line, opts, stylize) {
|
||||||
}
|
}
|
||||||
delete rec.req_id;
|
delete rec.req_id;
|
||||||
|
|
||||||
if (rec.latency) {
|
|
||||||
extras.push(rec.latency + "ms");
|
|
||||||
}
|
|
||||||
delete rec.latency;
|
|
||||||
|
|
||||||
var onelineMsg;
|
var onelineMsg;
|
||||||
if (rec.msg.indexOf('\n') !== -1) {
|
if (rec.msg.indexOf('\n') !== -1) {
|
||||||
onelineMsg = '';
|
onelineMsg = '';
|
||||||
|
|
Loading…
Reference in a new issue