use logging instead of printing to stdout/stderr directly
Remove uses of sys.stdout, sys.stderr, and print and replace them with logging calls via cliff's logger object. This gives the user control over the verbosity of the output of the command, since cliff ties the logger to the verbosity option.
Blueprint information
- Status:
- Complete
- Approver:
- Dean Troyer
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- None
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Dean Troyer
- Completed by
- Dean Troyer
Related branches
Related bugs
Sprints
Whiteboard
I want to tweak the logging settings just a bit. Cliff defaults the log level to WARNING and has --quiet and --verbose to adjust it, but I'd like to see some modifications, mostly to have a level between the default and DEBUG that can be used for high-level tracing of API calls and such.
So move the default to WARNING and mapping the options as follows:
* DEBUG is a firehose of information not generally needed for operation
'--debug' -or- '--verbose --verbose' (or '-v -v')
* INFO includes additional output over default like timing info and API calls
'--verbose' (or '-v')
* WARNING is the default and shows what may have been informational messages previously
<default>
* ERROR is the actual operational errors
'--quiet''
Gerrit topic: https:/
Addressed by: https:/
Clean up logging levels
Work Items
Work items:
Final adjustment of logging config: INPROGRESS