Better logging

This commit is contained in:
syuilo 2019-02-04 12:09:59 +09:00
parent 4275af2324
commit 3be89e9702
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 14 additions and 12 deletions

View file

@ -45,13 +45,13 @@ export default class Logger {
this.log(important ? chalk.bgGreen.white('DONE') : chalk.green('DONE'), chalk.green(message), important);
}
public info(message: string, important = false): void { // それ以外
this.log(chalk.blue('INFO'), message, important);
}
public debug(message: string, important = false): void { // デバッグ用に使う
public debug(message: string, important = false): void { // デバッグ用に使う(開発者にとっては必要だが利用者にとっては不要な情報)
if (process.env.NODE_ENV != 'production') {
this.log(chalk.gray('VERB'), chalk.gray(message), important);
}
}
public info(message: string, important = false): void { // それ以外
this.log(chalk.blue('INFO'), message, important);
}
}