note aexmachina's change, style tweaks for make check

master
Trent Mick 2014-05-28 23:35:56 -07:00
parent dbbfdde3e5
commit 71e5d1be25
3 changed files with 6 additions and 4 deletions

View File

@ -6,3 +6,4 @@ Isaac Schlueter (https://github.com/isaacs)
Rob Gulewich (https://github.com/rgulewich)
Bryan Cantrill (https://github.com/bcantrill)
Michael Hart (https://github.com/mhart)
Simon Wade (https://github.com/aexmachina)

View File

@ -8,6 +8,9 @@ Known issues:
## bunyan 0.23.0 (not yet released)
- [pull #42] Fix `bunyan` crash on a log record with `req.headers` that is a *string*
(by https://github.com/aexmachina).
- Drop node 0.6 support. I can't effectively `npm install` with a node 0.6
anymore.

View File

@ -756,11 +756,9 @@ function emitRecord(rec, line, opts, stylize) {
var headers = req.headers;
if (!headers) {
headers = '';
}
else if (typeof headers === 'string') {
} else if (typeof (headers) === 'string') {
headers = '\n' + headers;
}
else if (typeof headers === 'object') {
} else if (typeof (headers) === 'object') {
headers = '\n' + Object.keys(headers).map(function (h) {
return h + ': ' + headers[h];
}).join('\n');