Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[object Object] in bunyan 'res' output #44

Closed
trentm opened this issue Oct 5, 2012 · 2 comments
Closed

[object Object] in bunyan 'res' output #44

trentm opened this issue Oct 5, 2012 · 2 comments

Comments

@trentm
Copy link
Owner

trentm commented Oct 5, 2012

$ echo '{"name":"imgapi","hostname":"0525989e-2086-4270-b960-41dd661ebd7d","pid":73174,"audit":true,"level":30,"remoteAddress":"10.2.207.2","remotePort":63169,"req":{"method":"POST","url":"/images","headers":{"user-agent":"curl/7.27.0","host":"10.2.207.13","accept":"application/json","content-type":"application/json","content-length":"39"},"httpVersion":"1.1","trailers":{},"body":{"name":"foo","type":"zone-dataset"}},"res":{"statusCode":422,"headers":{"content-type":"application/json","content-length":54},"trailer":false,"body":{"message":"this went boom","name":"ValidationFailedError","statusCode":422,"body":{"code":"ValidationFailed","message":"this went boom"},"restCode":"ValidationFailed"}},"latency":6,"_audit":true,"msg":"handled: 422","time":"2012-10-05T04:32:35.715Z","src":{"file":"/opt/smartdc/imgapi/node_modules/restify/lib/plugins/audit.js","line":75,"func":"audit"},"v":0}' | bunyan
[2012-10-05T04:32:35.715Z]  INFO: imgapi/73174 on 0525989e-2086-4270-b960-41dd661ebd7d (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/audit.js:75 in audit): handled: 422 (6ms, audit=true, remoteAddress=10.2.207.2, remotePort=63169, _audit=true)
    POST /images HTTP/1.1
    user-agent: curl/7.27.0
    host: 10.2.207.13
    accept: application/json
    content-type: application/json
    content-length: 39

    {
      "name": "foo",
      "type": "zone-dataset"
    }
    --
    HTTP/1.1 422 Unprocessable Entity
    content-type: application/json
    content-length: 54

    [object Object]
@trentm
Copy link
Owner Author

trentm commented Oct 5, 2012

This in bunyan HEAD:

$ bunyan --version
bunyan 0.14.1

trentm added a commit that referenced this issue Oct 9, 2012
…is an object instead of a string.

See issue#38 for the same with `req.body`.
@trentm
Copy link
Owner Author

trentm commented Oct 9, 2012

Fixed in bunyan 0.14.1 release.

@trentm trentm closed this as completed Oct 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant