mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-03 01:13:55 +00:00
fix console log for undefined params
This commit is contained in:
parent
2c478e26ff
commit
0af55a4f5d
@ -24,7 +24,7 @@ Logger.prototype.error = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.events.emit("log", "error", ...arguments);
|
this.events.emit("log", "error", ...arguments);
|
||||||
this.logFunction(...Array.from(arguments).map(t => t.red));
|
this.logFunction(...Array.from(arguments).map(t => t ? t.red : t));
|
||||||
this.writeToFile("[error]: ", ...arguments);
|
this.writeToFile("[error]: ", ...arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ Logger.prototype.warn = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.events.emit("log", "warning", ...arguments);
|
this.events.emit("log", "warning", ...arguments);
|
||||||
this.logFunction(...Array.from(arguments).map(t => t.yellow));
|
this.logFunction(...Array.from(arguments).map(t => t ? t.yellow : t));
|
||||||
this.writeToFile("[warning]: ", ...arguments);
|
this.writeToFile("[warning]: ", ...arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ Logger.prototype.info = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.events.emit("log", "info", ...arguments);
|
this.events.emit("log", "info", ...arguments);
|
||||||
this.logFunction(...Array.from(arguments).map(t => t.green));
|
this.logFunction(...Array.from(arguments).map(t => t ? t.green : t));
|
||||||
this.writeToFile("[info]: ", ...arguments);
|
this.writeToFile("[info]: ", ...arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user