@ordojs/cli
Version:
Command-line interface for OrdoJS framework
48 lines (41 loc) • 874 B
text/typescript
/**
* @fileoverview OrdoJS CLI - Logger utility
*/
import chalk from 'chalk';
/**
* Logger utility for CLI output
*/
export const logger = {
/**
* Log an informational message
*/
info(message: string): void {
console.log(chalk.blue('info') + ' ' + message);
},
/**
* Log a success message
*/
success(message: string): void {
console.log(chalk.green('success') + ' ' + message);
},
/**
* Log a warning message
*/
warn(message: string): void {
console.log(chalk.yellow('warn') + ' ' + message);
},
/**
* Log an error message
*/
error(message: string): void {
console.error(chalk.red('error') + ' ' + message);
},
/**
* Log a debug message (only in debug mode)
*/
debug(message: string): void {
if (process.env.DEBUG) {
console.log(chalk.gray('debug') + ' ' + message);
}
}
};