summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-04 12:14:07 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-04 12:14:07 +0900
commit4982ea8f142fd2613a29a3980e4dbe8c18675ba1 (patch)
treef6a97a197ab6e99012ea392c962bc10cbb41bf13 /src
parentBetter logging (diff)
downloadsharkey-4982ea8f142fd2613a29a3980e4dbe8c18675ba1.tar.gz
sharkey-4982ea8f142fd2613a29a3980e4dbe8c18675ba1.tar.bz2
sharkey-4982ea8f142fd2613a29a3980e4dbe8c18675ba1.zip
Add --verbose option
Diffstat (limited to 'src')
-rw-r--r--src/argv.ts1
-rw-r--r--src/misc/logger.ts2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/argv.ts b/src/argv.ts
index 211b42a529..53050fe799 100644
--- a/src/argv.ts
+++ b/src/argv.ts
@@ -6,6 +6,7 @@ program
.option('--no-daemons', 'Disable daemon processes (for debbuging)')
.option('--disable-clustering', 'Disable clustering')
.option('--quiet', 'Suppress all logs')
+ .option('--verbose', 'Enable all logs')
.option('--slow', 'Delay all requests (for debbuging)')
.parse(process.argv);
diff --git a/src/misc/logger.ts b/src/misc/logger.ts
index e086445b37..609c255849 100644
--- a/src/misc/logger.ts
+++ b/src/misc/logger.ts
@@ -46,7 +46,7 @@ export default class Logger {
}
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);
}
}