LoggerConfig
Type Alias: LoggerConfig
Section titled “Type Alias: LoggerConfig”LoggerConfig =
object
Defined in: types.ts:159
Configuration for createLogger.
Properties
Section titled “Properties”context?
Section titled “context?”
optionalcontext?:Record<string,unknown>
Defined in: types.ts:166
Static context merged into every record.
level?
Section titled “level?”
optionallevel?:LevelSetting
Defined in: types.ts:164
Minimum level to emit. Records below this are dropped. "silent" mutes
the logger entirely. Defaults to "info".
optionalnow?: () =>Date
Defined in: types.ts:178
Optional clock for deterministic tests. Defaults to () => new Date().
Returns
Section titled “Returns”Date
onTransportError?
Section titled “onTransportError?”
optionalonTransportError?: (error,info) =>void
Defined in: types.ts:186
Diagnostic hook fired when a transport write or flush throws or
rejects. Failures are still swallowed so logging keeps working — this
hook is purely for observability (dev consoles, error tracking, etc.).
Inherited by child loggers created via logger.child().
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
scope?
Section titled “scope?”
optionalscope?:string
Defined in: types.ts:168
Initial hierarchical scope (see child(name)).
scopeSeparator?
Section titled “scopeSeparator?”
optionalscopeSeparator?:string
Defined in: types.ts:170
Separator used when nesting scopes via child(name). Defaults to ":".
timestamp?
Section titled “timestamp?”
optionaltimestamp?:TimestampFormat
Defined in: types.ts:174
How to format the record timestamp. Defaults to "iso".
transports?
Section titled “transports?”
optionaltransports?:Transport[]
Defined in: types.ts:172
Transports to fan out to. Defaults to [consoleTransport()].