mirror of
https://github.com/sigmasternchen/DrunkenMan
synced 2025-03-15 07:59:03 +00:00
18 lines
453 B
JavaScript
Executable file
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");
|