OptionalnewLeave a new line after Header
@default: undefined (i.e. false)
OptionalresolvedPrint 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)
OptionalresolvedPrint 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)
OptionallinePrint lineNumber from where a l.log() / l.xxx() is called
@default: undefined (i.e. false)
OptionaldateIf 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)
OptionaltimeIf 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)
OptionaltimerHow many chars to use for padding the milliseconds duration of .timer().
The type of
options.headerinOptionsNote: 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