* @param {object} [options] * @param {boolean | ((req: object) => boolean)} [options.disableRequestLogging=false] * When `true` (or a function returning `true`), per-request log lines * (incoming, completed, errors) are suppressed. * @param {string} [options.requestIdLogLabel='reqId'
(options)
| 19 | * The label used for the request identifier when logging the request. |
| 20 | */ |
| 21 | constructor (options) { |
| 22 | const opts = options || {} |
| 23 | this.disableRequestLogging = opts.disableRequestLogging || defaultInitOptions.disableRequestLogging |
| 24 | this.isDisableRequestLoggingFunction = typeof this.disableRequestLogging === 'function' |
| 25 | this.requestIdLogLabel = opts.requestIdLogLabel || defaultInitOptions.requestIdLogLabel |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Checks whether request logging is disabled for the given request. |
nothing calls this directly
no outgoing calls
no test coverage detected