Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface KoaReqLoggerOptions

A set of configuration options used to configure a new instance of KoaReqLogger.

Hierarchy

  • KoaReqLoggerOptions

Index

Properties

Optional alwaysError

alwaysError: undefined | false | true

When set to true, this option will force the log severity to be error for all non 2** response statuses.

Optional disableDateHeader

disableDateHeader: undefined | false | true

If set to true, this option will stop the Date header being added to responses.

Optional disableIdHeader

disableIdHeader: undefined | false | true

If set to true, this option will stop the X-Request-ID header being added to responses.

Optional disableResponseTimeHeader

disableResponseTimeHeader: undefined | false | true

If set to true, this option will stop the X-Response-Time header being added to responses.

Optional extreme

extreme: undefined | false | true

Configures pino the use extreme mode for added performance.

Optional pinoInstance

pinoInstance: pino.Logger

Allows you to pass your own instance of Pino preconfigured to use in the logging middleware. This option is not compatible with pinoOptions or extreme, as they don't make sense if you pass a preconfigured pino object. If a preconfigured instance is used requests, responses and errors will not be serialized.

Optional pinoOptions

pinoOptions: pino.LoggerOptions

These options will be passed to pino. If no serializers for req, res or err are specified the defaults will be used.

Optional uuidFunction

uuidFunction: RequestIdFunction

Allows you to override the default request id generation function. By default this is set to the uuidv4 function from the uuid node module.

Generated using TypeDoc