[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`.
This commit is contained in:
parent
02b5863f46
commit
6c61112793
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue