mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
20 lines
362 B
JavaScript
20 lines
362 B
JavaScript
var config = require("./config");
|
|
|
|
var exp = {};
|
|
|
|
function log() {
|
|
var time = new Date().toISOString();
|
|
var text = Array.prototype.slice.call(arguments).join(" ");
|
|
console.log(time + ": " + text);
|
|
}
|
|
|
|
exp.log = log;
|
|
exp.warn = log;
|
|
exp.error = log;
|
|
if (config.debug_enabled) {
|
|
exp.debug = log;
|
|
} else {
|
|
exp.debug = function(){};
|
|
}
|
|
|
|
module.exports = exp; |