From 4a23ebe5347caec77aa543aeb8c3796f839c55cb Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Feb 2019 20:10:20 +0900 Subject: Refactoring --- src/misc/logger.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/misc') diff --git a/src/misc/logger.ts b/src/misc/logger.ts index 6d75e65ce4..15d2c84d70 100644 --- a/src/misc/logger.ts +++ b/src/misc/logger.ts @@ -1,8 +1,7 @@ import * as cluster from 'cluster'; import chalk from 'chalk'; import * as dateformat from 'dateformat'; - -const quiet = process.argv.find(x => x == '--quiet'); +import { program } from '../argv'; export default class Logger { private domain: string; @@ -21,7 +20,7 @@ export default class Logger { } public log(level: string, message: string, important = false): void { - if (quiet) return; + if (program.quiet) return; const domain = this.color ? chalk.keyword(this.color)(this.domain) : chalk.white(this.domain); if (this.parentLogger) { this.parentLogger.log(level, `[${domain}]\t${message}`, important); -- cgit v1.2.3-freya