2016-03-24 17:19:32 +01:00
|
|
|
/* global console */
|
|
|
|
/* exported Log */
|
|
|
|
|
|
|
|
/* Magic Mirror
|
|
|
|
* Logger
|
|
|
|
*
|
|
|
|
* By Michael Teeuw http://michaelteeuw.nl
|
|
|
|
* MIT Licensed.
|
|
|
|
*/
|
|
|
|
|
2016-04-03 19:52:13 +02:00
|
|
|
// This logger is very simple, but needs to be extended.
|
2016-03-24 17:19:32 +01:00
|
|
|
// This system can eventually be used to push the log messages to an external target.
|
|
|
|
|
|
|
|
var Log = (function() {
|
|
|
|
return {
|
2016-10-13 13:24:56 +02:00
|
|
|
info: function() {
|
|
|
|
console.info.apply(this, arguments);
|
2016-03-24 17:19:32 +01:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
log: function() {
|
|
|
|
console.log.apply(this, arguments);
|
2016-03-24 17:19:32 +01:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
error: function() {
|
|
|
|
console.error.apply(this, arguments);
|
2016-05-01 13:46:41 -04:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
warn: function() {
|
|
|
|
console.warn.apply(this, arguments);
|
2016-05-01 13:46:41 -04:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
group: function() {
|
|
|
|
console.group.apply(this, arguments);
|
2016-05-01 13:46:41 -04:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
groupCollapsed: function() {
|
|
|
|
console.groupCollapsed.apply(this, arguments);
|
2016-05-01 23:30:01 +02:00
|
|
|
},
|
2016-05-01 13:46:41 -04:00
|
|
|
groupEnd: function() {
|
|
|
|
console.groupEnd();
|
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
time: function() {
|
|
|
|
console.time.apply(this, arguments);
|
2016-05-01 13:46:41 -04:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
timeEnd: function() {
|
|
|
|
console.timeEnd.apply(this, arguments);
|
2016-05-01 13:46:41 -04:00
|
|
|
},
|
2016-10-13 13:24:56 +02:00
|
|
|
timeStamp: function() {
|
|
|
|
console.timeStamp.apply(this, arguments);
|
2016-03-24 17:19:32 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|