Skip to content
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

set root log level from zappa log_level #1347

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ceturc
Copy link

@ceturc ceturc commented Aug 14, 2024

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

@ceturc ceturc marked this pull request as ready for review August 14, 2024 00:47
fix isort finding in tests
Copy link

@elip-OE elip-OE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@ceturc
Copy link
Author

ceturc commented Nov 11, 2024

Hi Zappa Maintainers - any interest in merging this P/R to fix an issue introduced in 0.59.0?

@coveralls
Copy link

Coverage Status

coverage: 74.662% (+0.01%) from 74.648%
when pulling 96792a2 on ceturc:set-root-log-level
into b00312d on zappa:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants