article-writer-cn
Version:
AI 驱动的智能写作系统 - 专注公众号/自媒体文章创作
21 lines • 638 B
JavaScript
import chalk from 'chalk';
export const logger = {
info: (message, ...args) => {
console.log(chalk.blue('ℹ'), message, ...args);
},
success: (message, ...args) => {
console.log(chalk.green('✓'), message, ...args);
},
warn: (message, ...args) => {
console.log(chalk.yellow('⚠'), message, ...args);
},
error: (message, ...args) => {
console.error(chalk.red('✗'), message, ...args);
},
debug: (message, ...args) => {
if (process.env.DEBUG) {
console.log(chalk.gray('⚙'), message, ...args);
}
}
};
//# sourceMappingURL=logger.js.map