Files
dd-multitool/bot/log.js
koneko 7a87b284af
Some checks failed
Deploy bot / build-and-deploy (push) Failing after 2s
Readd
2025-08-26 00:28:59 +02:00

15 lines
467 B
JavaScript

// logger.js
function log(level, message, ...args) {
const now = new Date().toISOString();
const levelLabel = `[${level.toUpperCase()}]`.padEnd(8);
console.log(`${now} ${levelLabel} ${message}`, ...args);
}
module.exports = {
info: (msg, ...args) => log("info", msg, ...args),
warn: (msg, ...args) => log("warn", msg, ...args),
error: (msg, ...args) => log("error", msg, ...args),
debug: (msg, ...args) => log("debug", msg, ...args),
};