-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
This is about code cleanup because logging should not cause a program to exit suddenly which is what it does now when logger.critical() is called.
Acceptance criteria:
- Add a new logger, {{logger.critical_with_exit }}that does what the existing{{ logger.critical() }}does now.
- Add a new LogLevel higher than 50: https://github.com/oamg/convert2rhel/blob/aeca505239d20a04e8e68d76ab8cb9751e7c7cdf/convert2rhel/logger.py#L39
- Search logger.py for critical and add the appropriate code for critical_with_exit() there.
- Move all existing usage of critical() in our code to critical_with_exit()
- Rename critical_no_exit() to critical()
- At this point, new code should use logger.critical() and should expect that the log call will not exit.
- This should perform the find and replace:{{ find . -name '*.py' -exec sed -i s/critical_no_exit/critical/g {} \;}}
- is depended on by
-
RHELC-1320 Replace critical_with_exit with raising an exception
- To Do