note aexmachina's change, style tweaks for make check

This commit is contained in:
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) Rob Gulewich (https://github.com/rgulewich)
Bryan Cantrill (https://github.com/bcantrill) Bryan Cantrill (https://github.com/bcantrill)
Michael Hart (https://github.com/mhart) 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) ## 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 - Drop node 0.6 support. I can't effectively `npm install` with a node 0.6
anymore. anymore.

View file

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