interface LoggerPluginOptions
Since 0.1.0

Options for LoggerPlugin.

Properties

readonly
optional
level: LogLevel

Minimum level to emit. Defaults to 'info'.

readonly
optional
transport: LoggerTransport

Underlying logger implementation. Defaults to 'console'.

readonly
optional
pretty: boolean

When true (and transport: 'console'), pretty-print entries.

readonly
optional
redact: readonly string[]

Dot-paths to redact from metadata (e.g. ['password', 'token']).

readonly
optional
requestLogging: boolean

When true, register automatic request/response logging middleware.

readonly
optional
slowRequestThreshold: number

Requests slower than this (ms) trigger a warn entry. Defaults to 5000.

readonly
optional
excludePaths: readonly string[]

Exact paths excluded from request logging.

Since 0.1.0
readonly
optional
pinoFactory: PinoFactory

Inject a pre-loaded Pino factory for the pino transport, bypassing the import('npm:pino') path. Useful for tests.

Usage

import { type LoggerPluginOptions } from "logger-plugin/src/index.ts";