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 optional support to log path params #164

Merged

Conversation

jonathansamines
Copy link
Contributor

hapi-pino binds the request only once during the onRequest hook:

https://github.com/pinojs/hapi-pino/blob/27806507920fda5db27c2daca0a99259423ba647/index.js#L111-L118

However, hapi only makes request.params available later in the request lifecycle, and it is accessible only after onPreAuth at the earliest. This pull request adds optional support to log pathParams when logPathParams is true, in pretty much the same way that logQueryParams works

@coveralls
Copy link

Coverage Status

Coverage decreased (-99.07%) to 0.0% when pulling 27b2751 on jonathansamines:feature/optional-path-params-log into 2780650 on pinojs:master.

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 08c46d3 into hapijs:master May 26, 2022
@jonathansamines jonathansamines deleted the feature/optional-path-params-log branch June 6, 2022 22:37
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

Successfully merging this pull request may close these issues.

3 participants