This commit is contained in:
seb
2026-07-06 01:31:11 +02:00
commit 917930d0fa
34 changed files with 2912 additions and 0 deletions

20
src/logger.js Normal file
View File

@@ -0,0 +1,20 @@
import chalk from 'chalk';
function timestamp() {
return chalk.gray(new Date().toISOString());
}
export const logger = {
info(...args) {
console.log(timestamp(), chalk.cyan('INFO'), ...args);
},
success(...args) {
console.log(timestamp(), chalk.green('OK'), ...args);
},
warn(...args) {
console.warn(timestamp(), chalk.yellow('WARN'), ...args);
},
error(...args) {
console.error(timestamp(), chalk.red('ERROR'), ...args);
},
};