mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
unit tests
This commit is contained in:
10
js/logger.js
10
js/logger.js
@@ -22,7 +22,8 @@
|
||||
root.Log = factory(root.config);
|
||||
}
|
||||
})(this, function (config) {
|
||||
const logLevel = {
|
||||
|
||||
let logLevel = {
|
||||
debug: Function.prototype.bind.call(console.debug, console),
|
||||
log: Function.prototype.bind.call(console.log, console),
|
||||
info: Function.prototype.bind.call(console.info, console),
|
||||
@@ -32,8 +33,11 @@
|
||||
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
|
||||
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
|
||||
time: Function.prototype.bind.call(console.time, console),
|
||||
timeEnd: Function.prototype.bind.call(console.timeEnd, console),
|
||||
timeStamp: Function.prototype.bind.call(console.timeStamp, console)
|
||||
timeEnd: Function.prototype.bind.call(console.timeEnd, console)
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV.trim() !== "test") {
|
||||
logLevel.push({timeStamp: Function.prototype.bind.call(console.timeStamp, console)});
|
||||
};
|
||||
|
||||
logLevel.setLogLevel = function (newLevel) {
|
||||
|
Reference in New Issue
Block a user