adds the ability to specify the existing options.logRequestStart using a function syntax: (Request) => boolean, which selectively enables/disables the logging on requestStart for the given request
adds the same functionality for the "request complete" event, letting you pass in either a boolean or a function of the same style.
Coverage increased (+0.1%) to 99.161% when pulling cda5cd8ead442dd2bee79ecc1365b0d1f92bd2c3 on devshackio:feat-logRequestStart-logRequestComplete into 890b79efc8ce6dac9bfa733106558fc9a25e4b74 on pinojs:master.
Stacked on top of https://github.com/pinojs/hapi-pino/pull/89 for formatting improvements to the README
This PR:
adds the ability to specify the existing
options.logRequestStart
using a function syntax:(Request) => boolean
, which selectively enables/disables the logging on requestStart for the given requestadds the same functionality for the "request complete" event, letting you pass in either a boolean or a function of the same style.
keeps the current behavior / defaults, namely:
request start
events are not loggedrequest completed
events are logged