bugfix
This commit is contained in:
parent
44226e6a92
commit
38e7833385
@ -45,9 +45,9 @@ class LoggerClient implements Logger
|
||||
if (typeof this.#_logLevelMapping[type] === 'undefined')
|
||||
throw new Error(`Missing logLevelMapping for type ${type}`);
|
||||
Object.defineProperty(this, type, {
|
||||
value: (msg: string, o: WriteOptions) =>
|
||||
value: (msg: string, o?: WriteOptions) =>
|
||||
{
|
||||
const { labels = [], ...writeOpts } = o;
|
||||
const { labels = [], ...writeOpts } = o ?? {};
|
||||
this.#transport(msg, { ...writeOpts, type, labels: [ ...this.#labels, ...labels ] });
|
||||
}
|
||||
});
|
||||
|
@ -85,7 +85,7 @@ class MasterLogger implements Logger
|
||||
if (typeof this.#_logLevelMapping[type] === 'undefined')
|
||||
throw new Error(`Missing logLevelMapping for type ${type}`);
|
||||
Object.defineProperty(this, type, {
|
||||
value: (msg: string, opts: WriteOptions) => this.write(type, msg, opts)
|
||||
value: (msg: string, opts?: WriteOptions) => this.write(type, msg, opts)
|
||||
});
|
||||
}
|
||||
this.#colours = { ...Defaults.Colours, ...customColours };
|
||||
|
Loading…
Reference in New Issue
Block a user