@gvray/logger / LogOptions
Interface: LogOptions
Defined in: types.ts:27
Configuration options passed to the Logger constructor.
Properties
colors?
optionalcolors?:boolean
Defined in: types.ts:38
Whether to enable ANSI color escape codes in output. When omitted, the logger auto-detects: enabled on an interactive terminal (TTY), disabled in browsers and non-TTY streams (pipes/files) where ANSI codes would render as garbage or pollute the output.
level?
optionallevel?:LogLevel
Defined in: types.ts:29
Minimum log level. Messages below this level are not output.
Default
ts
LogLevel.DEBUGnamespace?
optionalnamespace?:string
Defined in: types.ts:31
Namespace prefix shown on every log line, e.g. app:http.
timestamp?
optionaltimestamp?:boolean|TimestampFormat
Defined in: types.ts:46
Timestamp format for each log line.
trueenables ISO format- a string selects a built-in format (
'iso' | 'locale' | 'time' | 'unix') - a function returns a custom formatted string