mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
/* global console */
|
|
/* exported Log */
|
|
|
|
/* Magic Mirror
|
|
* Logger
|
|
*
|
|
* By Michael Teeuw http://michaelteeuw.nl
|
|
* MIT Licensed.
|
|
*/
|
|
|
|
// This logger is very simple, but needs to be extended.
|
|
// This system can eventually be used to push the log messages to an external target.
|
|
|
|
var Log = (function() {
|
|
return {
|
|
info: function() {
|
|
console.info.apply(console, arguments);
|
|
},
|
|
log: function() {
|
|
console.log.apply(console, arguments);
|
|
},
|
|
error: function() {
|
|
console.error.apply(console, arguments);
|
|
},
|
|
warn: function() {
|
|
console.warn.apply(console, arguments);
|
|
},
|
|
group: function() {
|
|
console.group.apply(console, arguments);
|
|
},
|
|
groupCollapsed: function() {
|
|
console.groupCollapsed.apply(console, arguments);
|
|
},
|
|
groupEnd: function() {
|
|
console.groupEnd();
|
|
},
|
|
time: function() {
|
|
console.time.apply(console, arguments);
|
|
},
|
|
timeEnd: function() {
|
|
console.timeEnd.apply(console, arguments);
|
|
},
|
|
timeStamp: function() {
|
|
console.timeStamp.apply(console, arguments);
|
|
}
|
|
};
|
|
})();
|