Error-reporting over mail also

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-26 14:22:59 +01:00
parent 86f8a936fc
commit 181fd93e69
6 changed files with 91 additions and 18 deletions

View File

@@ -1,12 +1,16 @@
var Helper = {
logs: [],
log: function(to_log) {
if(localStorage.debug === "true") {
console.log("------------");
console.log("------------ " + new Date());
for(var i = 0; i < to_log.length; i++) {
console.log(to_log[i]);
}
console.log("------------");
console.log("------------ " + new Date());
}
Helper.logs.unshift({log: to_log, date: new Date()});
if(Helper.logs.length > 10) {
Helper.logs.splice(-1, Helper.logs.length - 10);
}
},