mirror of
https://github.com/nicolabs/musiccast-repairkit.git
synced 2025-09-07 16:10:34 +02:00
+ -l option to set the log level
This commit is contained in:
parent
60c096a39b
commit
f32c31f46a
12
index.js
12
index.js
|
@ -124,11 +124,23 @@ const argv = yargs
|
|||
type: 'array',
|
||||
demandOption: true
|
||||
})
|
||||
.option('l', {
|
||||
alias: ['log-level'],
|
||||
describe: 'Specifies the logging level',
|
||||
choices: ['error','warn','info','http','verbose','debug','silly'],
|
||||
type: 'string'
|
||||
})
|
||||
// --config : configuration as a whole .json file
|
||||
.config()
|
||||
.help()
|
||||
.alias('help', 'h')
|
||||
.argv;
|
||||
|
||||
// Reflects log level option
|
||||
if ( argv.l !== undefined ) {
|
||||
log.level = argv.l;
|
||||
}
|
||||
|
||||
log.debug("argv: %o", argv);
|
||||
|
||||
// Instanciates the handlers for each scenario
|
||||
|
|
Loading…
Reference in a new issue