Alokai

LoggerOptions

Options for the logger.

interface LoggerOptions {
	includeStackTrace?: boolean;
	redactKeys?: readonly (RegExp | string)[];
	verbosity?: LogVerbosity;
}

Properties

NameRequiredTypeDescription
includeStackTraceOptionalbooleanAllow error stack traces in the log. Even when enabled, traces are only attached to 5xx HttpErrors and non-HttpError exceptions, never to 4xx client errors. true
redactKeysOptionalreadonly (RegExp | string)[]Extra metadata keys whose values are replaced with [REDACTED] in every log, on top of a built-in secrets list (authorization, cookie, token, secret, ...) that is always applied and cannot be removed. A string matches a key exactly; a RegExp matches via test - use the i flag for case-insensitive matching, never the g flag.
verbosityOptionalLogVerbosityMinimum severity to log; anything less severe is dropped. "info"

Referenced Types

On this page