1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-13 22:28:58 +09:00

Add --verbose option

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

View File

@ -6,6 +6,7 @@ program
.option('--no-daemons', 'Disable daemon processes (for debbuging)') .option('--no-daemons', 'Disable daemon processes (for debbuging)')
.option('--disable-clustering', 'Disable clustering') .option('--disable-clustering', 'Disable clustering')
.option('--quiet', 'Suppress all logs') .option('--quiet', 'Suppress all logs')
.option('--verbose', 'Enable all logs')
.option('--slow', 'Delay all requests (for debbuging)') .option('--slow', 'Delay all requests (for debbuging)')
.parse(process.argv); .parse(process.argv);

View File

@ -46,7 +46,7 @@ export default class Logger {
} }
public debug(message: string, important = false): void { // デバッグ用に使う(開発者にとっては必要だが利用者にとっては不要な情報) public debug(message: string, important = false): void { // デバッグ用に使う(開発者にとっては必要だが利用者にとっては不要な情報)
if (process.env.NODE_ENV != 'production') { if (process.env.NODE_ENV != 'production' || program.verbose) {
this.log(chalk.gray('VERB'), chalk.gray(message), important); this.log(chalk.gray('VERB'), chalk.gray(message), important);
} }
} }