A LoggingService class that allows for configurable verbosity of logging
To line up with the SLS core, the flag --verbose or -v (shortcut) with no value sets to most verbose (debug)
Users can also set a specific verbosity by providing a value after the flag. For example -v error, -v debug
Closes #374
How did you implement it:
LoggingService is used by both the BaseService and the BasePlugin, which make all current logging calls. Added calls for error, warn, info and debug to both base service and base plugin. Did not update to use any of the new calls, everything is currently logged as info. Which means that if you were to set verbosity to either warn or error in the CLI, there would be no log statements shown
How can we verify it:
Add -v error to any CLI run. There will be no log statements printed. Then try with -v info or -v debug, and there will be log statements printed. The codebase will need to be updated with the appropriate level of log for each current statement where necessary, but that is outside the scope of this PR.
Todos:
Note: Run npm run test:ci to run all validation checks on proposed changes
[x] Ensure there are no lint errors. Validate via npm run lint Note: Some reported issues can be automatically fixed by running npm run lint:fix
[x] Write tests and confirm existing functionality is not broken. Validate via npm test
[x] Write documentation
[x] Provide verification config / commands / resources
[x] Enable "Allow edits from maintainers" for this PR
[x] Update the messages below
Is this ready for review?: YES
Is it a breaking change?: NO
What did you implement:
A
LoggingService
class that allows for configurable verbosity of logging--verbose
or-v
(shortcut) with no value sets to most verbose (debug)-v error
,-v debug
Closes #374
How did you implement it:
LoggingService
is used by both theBaseService
and theBasePlugin
, which make all current logging calls. Added calls forerror
,warn
,info
anddebug
to both base service and base plugin. Did not update to use any of the new calls, everything is currently logged asinfo
. Which means that if you were to set verbosity to eitherwarn
orerror
in the CLI, there would be no log statements shownHow can we verify it:
Add
-v error
to any CLI run. There will be no log statements printed. Then try with-v info
or-v debug
, and there will be log statements printed. The codebase will need to be updated with the appropriate level of log for each current statement where necessary, but that is outside the scope of this PR.Todos:
Note: Run
npm run test:ci
to run all validation checks on proposed changesValidate via
npm run lint
Note: Some reported issues can be automatically fixed by running
npm run lint:fix
Validate via
npm test
Is this ready for review?: YES Is it a breaking change?: NO