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

Add ability to log request and response payloads in Hapi.js using Good #175

Closed
jeltok opened this issue Aug 27, 2014 · 4 comments
Closed

Add ability to log request and response payloads in Hapi.js using Good #175

jeltok opened this issue Aug 27, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@jeltok
Copy link

@jeltok jeltok commented Aug 27, 2014

It would be very useful to have Good to be able to log request and response payloads, the same way as it prints request URL and query parameters.

Would be great if I could specify it as a e.g. 'logPayloads' flag for Good logging system. For example:

var goodOptions = {
    maxLogSize: 1024 * 1024,
    subscribers: {
        'console': ['ops', 'log', 'request', 'error', 'payload']
    },
    logPayloads: true, // --> My very desirable option that does not exist (yet)
    opsInterval: 15*60*1000
};

The configuration could also be more detailed, e.g.

    ...
    logPayloads: {
        request: true,
        response: false,
        maxBytes: 1024
    }
    ...
@KyleAMathews

This comment has been minimized.

Copy link

@KyleAMathews KyleAMathews commented Aug 27, 2014

I'd like this as well.

@lloydbenson

This comment has been minimized.

Copy link
Contributor

@lloydbenson lloydbenson commented Aug 29, 2014

Thanks for adding the issue!

@lloydbenson lloydbenson added this to the 2.3.0 milestone Aug 29, 2014
@lloydbenson

This comment has been minimized.

Copy link
Contributor

@lloydbenson lloydbenson commented Sep 3, 2014

this should get you what you need, but having it reviewed #184

@lloydbenson lloydbenson self-assigned this Sep 3, 2014
@lloydbenson

This comment has been minimized.

Copy link
Contributor

@lloydbenson lloydbenson commented Sep 3, 2014

all set.

@lloydbenson lloydbenson closed this Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.