This repository has been archived on 2025-08-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
shiro-calculator/log.js
koneko 5ab215a601
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 3s
sss
2025-08-14 21:10:50 +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),
};