Add CLI flag for enabling debug logging
This commit is contained in:
parent
93dcf18cb5
commit
2ed5fcf64e
|
@ -24,6 +24,11 @@ var Logger = module.exports = {
|
|||
var logger = Config.logging.logger,
|
||||
level = Config.logging.level || "info";
|
||||
|
||||
// --debug CLI flag overrides any other option
|
||||
if (_.includes(process.argv, "--debug")) {
|
||||
level = "debug";
|
||||
}
|
||||
|
||||
logger = (logger == null) ? BasicLogger : logger;
|
||||
|
||||
this.logger = logger || NullLogger;
|
||||
|
|
Loading…
Reference in New Issue