-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/819 add api option to get request response printed to log #820
Changes from all commits
8ef56d7
ad9f062
fd31c94
a8a358a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ const Util = { | |
/** @type {TYPE.skipInteraction} */ | ||
skipInteraction: false, | ||
packageJsonMcdev: packageJsonMcdev, | ||
|
||
OPTIONS: {}, | ||
/** | ||
* helper that allows filtering an object by its keys | ||
* | ||
|
@@ -469,23 +469,27 @@ const Util = { | |
if (argv.silent) { | ||
// only errors printed to CLI | ||
Util.logger.level = 'error'; | ||
Util.OPTIONS.loggerLevel = 'error'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need this? or can we just set the line above? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the first one we need, the second one we technically don't. I figured it's good practice to have it all in one place though for reference by other classes |
||
Util.loggerTransports.console.level = 'error'; | ||
Util.logger.debug('CLI logger set to: silent'); | ||
} else if (argv.verbose) { | ||
// chatty user cli logs | ||
Util.logger.level = 'verbose'; | ||
Util.OPTIONS.loggerLevel = 'verbose'; | ||
Util.loggerTransports.console.level = 'verbose'; | ||
Util.logger.debug('CLI logger set to: verbose'); | ||
} else { | ||
// default user cli logs | ||
// TODO to be switched to "warn" when cli-process is integrated | ||
Util.logger.level = 'info'; | ||
Util.OPTIONS.loggerLevel = 'info'; | ||
Util.loggerTransports.console.level = 'info'; | ||
Util.logger.debug('CLI logger set to: info / default'); | ||
} | ||
if (argv.debug) { | ||
// enables developer output & features. no change to actual logs | ||
Util.logger.level = 'debug'; | ||
Util.OPTIONS.loggerLevel = 'debug'; | ||
Util.loggerTransports.console.level = 'debug'; | ||
Util.logger.debug('CLI logger set to: debug'); | ||
} | ||
|
Check failure
Code scanning / CodeQL
Hard-coded credentials