feat: add logger for cli

This commit is contained in:
Tobi Saputra 2025-03-03 20:59:51 +07:00
parent d92bb6942a
commit 7fa75905e8

23
src/utils/logger.ts Normal file
View File

@ -0,0 +1,23 @@
import chalk from "chalk"
export class Logger {
static success(message: string): void {
console.log(chalk.green("✓ " + message))
}
static error(message: string): void {
console.error(chalk.red("✗ " + message))
}
static info(message: string): void {
console.log(chalk.blue(" " + message))
}
static warning(message: string): void {
console.log(chalk.yellow("⚠ " + message))
}
static result(message: string, color = chalk.cyan): void {
console.log(color(message))
}
}