set root log level from zappa log_level #1347
Open
+103
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Per ticket #1336, this P/R reverts part of PR #1277 to restore Zappa's prior functionality of setting the root log level.
PR #1277 (inadvertently?) broke cloudwatch logging for many users who use logging.info("") via Zappa's log_level = "INFO" or "DEBUG". Previously (before PR #1277 and 0.59.0), Zappa would set the root logger with Zappa's log_level. After 0.59.0, this functionality was removed via PR #1277.
This P/R restores the old log_level functionality, while still preserving the goal of PR #1277 to have separate loggers.
This P/R also adds unit tests to confirm logging is working as expected for the future. This P/R was tested locally on Python 3.8, 3.9, 3.10, 3.11, and 3.12, and in real AWS Lambda per the contributor guidelines.
GitHub Issues
See #1336