trigger log events for all log levels

This commit is contained in:
Iuri Matias 2018-02-27 06:34:17 -05:00 committed by Pascal Precht
parent ceb107f43b
commit 5de1c6e539
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,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);
}; };