Optional
newLeave a new line after Header
@default: undefined
(i.e. false
)
Optional
resolvedPrint resolvedName
(eg {MyLogger@/some/path}
) even if instance has a loggerName
(and has been used on header).
The resolvedName
is the name found on pathReplacements
, or the plain relativePath
itself otherwise.
@default: undefined
(i.e. false
)
Optional
resolvedPrint resolved path from where a .log()
& all sibling .xxx()
are called.
Uses filename where it is called from on Header, but ONLY if different to loggerName.
Resolves via pathReplacements
.
Incurs small extra processing for each .log()
operation.
@default: undefined
(i.e. false
)
Optional
linePrint lineNumber
from where a l.log()
/ l.xxx()
is called
@default: undefined
(i.e. false
)
Optional
dateIf true
, it prints current Date, eg:
2023-07-08 LOG (src/docs/temp): Hello Date Time!
Using new Date().toISOString().slice(0, 10)
You can override passing a string returning function, eg
date: () => new Date().toLocaleDateString(),
@default: undefined
(i.e. false
)
Optional
timeIf true, it print current Time, eg
18:25:04 LOG (src/docs/temp): Hello Date Time!
Using (new Date).toLocaleTimeString()
.
You can override passing a string returning function, eg
time: () => new Date().toLocaleTimeString(),
@default: undefined
(i.e. false
)
Optional
timerHow many chars to use for padding the milliseconds duration of .timer()
.
The type of
options.header
inOptions
Note: it is a class only for validation purposes via class-validator, but it's not meant to be instantiated.
See
Header Options - Print the info you want