Better logs

This commit is contained in:
syuilo
2019-02-03 01:33:34 +09:00
parent 05baa89508
commit a3e37294e5
2 changed files with 10 additions and 9 deletions

View File

@ -29,16 +29,16 @@ export default class Logger {
this.log(chalk.red.bold('ERROR'), chalk.red.bold(message.toString()));
}
public warn(message: string): void { // 実行を継続できるが改善すべき状況で使う
this.log(chalk.yellow.bold('WARN'), chalk.yellow.bold(message));
public warn(message: string, important = false): void { // 実行を継続できるが改善すべき状況で使う
this.log(chalk.yellow.bold('WARN'), chalk.yellow.bold(message), important);
}
public succ(message: string, important = false): void { // 何かに成功した状況で使う
this.log(chalk.blue.green('DONE'), chalk.green.bold(message), important);
}
public info(message: string): void { // それ以外
this.log(chalk.blue.bold('INFO'), message);
public info(message: string, important = false): void { // それ以外
this.log(chalk.blue.bold('INFO'), message, important);
}
}