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 support for custom messages on request completion/receive/failure #163

Merged

Conversation

jonathansamines
Copy link
Contributor

hapi-pino 9.2.0 and 9.3.0 added a few changes to the default output of "request completed" and "request error", that while useful for certain transports it can be redundant for others (the same information is already included). This pull request adds a way to customize these messages without changing the defaults:

  • customRequestStartMessage - to customize messages when enabled by logRequestStart
  • customRequestCompleteMessage - to customize messages when enabled by logRequestComplete
  • customRequestErrorMessage - to customize request error messages

These properties are based on equivalent properties existing in other implementations, specifically in pino-http, but the terminology is changed to fit better with existing terminology in this project.

This also addresses #162 without unnecessarily changing the existing defaults.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.073% when pulling e55d717 on jonathansamines:feature/custom-access-log-messages into 0f187f3 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

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