mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
21 lines
582 B
JavaScript
21 lines
582 B
JavaScript
module.exports = function(debugMode = false){
|
|
return {
|
|
log(message = "") {
|
|
const now = new Date();
|
|
console.log('LOG ', now.toGMTString(), ': ', message);
|
|
},
|
|
|
|
debug(message = "") {
|
|
if (!debugMode) return;
|
|
const now = new Date();
|
|
console.debug('DEBUG ', now.toGMTString(), ': ', message);
|
|
},
|
|
|
|
error(message = "") {
|
|
if (!debugMode) return;
|
|
const now = new Date();
|
|
console.error('ERROR ', now.toGMTString(), ': ', message);
|
|
}
|
|
};
|
|
};
|