[issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an object instead of a string.

See issue#38 for the same with `req.body`.
master
Trent Mick 2012-10-09 15:17:15 -07:00
parent 02b5863f46
commit 6c61112793
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,8 @@
## bunyan 0.14.1 (not yet released)
(nothing yet)
- [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an
object instead of a string. See issue#38 for the same with `req.body`.
## bunyan 0.14.0

View File

@ -702,7 +702,8 @@ function emitRecord(rec, line, opts, stylize) {
delete res.headers;
delete res.statusCode;
if (res.body) {
s += '\n\n' + res.body
s += '\n\n' + (typeof(res.body) === 'object'
? JSON.stringify(res.body, null, 2) : res.body);
delete res.body;
}
if (res.trailer) {