update logging
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 16s

This commit is contained in:
2025-08-14 21:08:14 +02:00
parent c6c350ce0a
commit 94886ea397
5 changed files with 21 additions and 309 deletions

14
log.js Normal file
View File

@ -0,0 +1,14 @@
// logger.js
function log(level, message, ...args) {
const now = new Date().toISOString();
const levelLabel = `[${level.toUpperCase()}]`.padEnd(8);
log.info(`${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),
};