DrunkenMan/scripts/libs/Debugger.js
2014-03-08 14:21:29 +01:00

18 lines
453 B
JavaScript
Executable file

/*
* class for debugging
*/
function Debug () {
}
// logs status messages with time in console.log
Debug.log = function (source, text) {
var date = new Date();
var string = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds() + "." + date.getMilliseconds();
for (var i = string.length; i < 15; i++)
string += " ";
string += " from " + source + ": " + text + "...";
console.log(string);
}
Debug.log("Debug", "module loaded");