trigger log events for all log levels
This commit is contained in:
parent
925ae068b0
commit
53076fabee
|
@ -32,7 +32,7 @@ Logger.prototype.warn = function () {
|
||||||
if (!arguments.length || !(this.shouldLog('warn'))) {
|
if (!arguments.length || !(this.shouldLog('warn'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.events.emit("log", "warning", ...arguments);
|
this.events.emit("log", "warn", ...arguments);
|
||||||
this.logFunction(...Array.from(arguments).map(t => { return t ? t.yellow : t; }));
|
this.logFunction(...Array.from(arguments).map(t => { return t ? t.yellow : t; }));
|
||||||
this.writeToFile("[warning]: ", ...arguments);
|
this.writeToFile("[warning]: ", ...arguments);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue