diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-03 20:10:20 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-03 20:10:20 +0900 |
| commit | 4a23ebe5347caec77aa543aeb8c3796f839c55cb (patch) | |
| tree | c52fbcb2fada25457c3d81c4a7fee8d75aae196f /src/misc | |
| parent | Remember the media playback volume (#4089) (diff) | |
| download | sharkey-4a23ebe5347caec77aa543aeb8c3796f839c55cb.tar.gz sharkey-4a23ebe5347caec77aa543aeb8c3796f839c55cb.tar.bz2 sharkey-4a23ebe5347caec77aa543aeb8c3796f839c55cb.zip | |
Refactoring
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/logger.ts | 5 |
1 files changed, 2 insertions, 3 deletions
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); |