chore: 🎉 initial commit

This commit is contained in:
UltraLionFr
2025-08-26 01:01:34 +02:00
parent bf6d61e5a3
commit 30cfbd73fc
27 changed files with 1341 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
const chalk = require("chalk");
function timestamp() {
return chalk.gray(`[${new Date().toLocaleTimeString("fr-FR")}]`);
}
const logger = {
info: (msg) => {
console.log(`${timestamp()} ${chalk.blue("[INFO]")} ${msg}`);
},
success: (msg) => {
console.log(`${timestamp()} ${chalk.green("[SUCCESS]")} ${msg}`);
},
warn: (msg) => {
console.warn(`${timestamp()} ${chalk.yellow("[WARN]")} ${msg}`);
},
error: (msg) => {
console.error(`${timestamp()} ${chalk.red("[ERROR]")} ${msg}`);
},
debug: (msg) => {
if (process.env.DEBUG === "true") {
console.log(`${timestamp()} ${chalk.magenta("[DEBUG]")} ${msg}`);
}
}
};
module.exports = logger;