-
Notifications
You must be signed in to change notification settings - Fork 364
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
Upgrade from 0.58.0 to 0.59.0 removed access logs from cloudwatch #1336
Comments
Hi. If helpful, I believe I experience this issue too. Upgraded requirements some days ago and discovered this morning my logs in Cloudwatch from the Zappa deployment were gone. What worked for me in the end: downgrading zappa 0.59 to 0.58 again. Expected BehaviorWhen I set Actual BehaviorWhen I set Your EnvironmentZappa version used: 0.59.0 -> No INFO logs here, I did spot a WARNING log though Web service type: Django 4.2 Operating System and Python version: amazon/aws-lambda-python:3.8 docker Your zappa_settings.json: These settings might be relevant, but note that I kept them consistent for the two version
Downgrading fixed my problem for now, so just reporting if the extra context is helpful 👍 |
@elip-OE To work around this breaking change, you can copy the configured app = Flask(__name__)
# work around breaking change in https://github.com/zappa/Zappa/pull/1277
# by copying the log level from zappa's logger (now called "handler") up to the root logger
zappa_log_level = logging.getLogger("handler").level
logging.getLogger().setLevel(zappa_log_level)
logging.info("This log message should appear in the Lambda cloudwatch logs if Zappa's log_level=INFO") This change in #1277 is no longer setting the root log level from the zappa_settings The system now sets the Previously, the system would set the Thanks to @paulclarkaranz for pointing out the P/R that introduced the breaking change. I doubt that PR #1277 was intended to be a breaking change, but for all of us that use logging.info() in our app code (root logger), with Zappa's log_level="INFO", the change caused all of our logs to disappear, because Zappa is no longer setting the root log level. |
Thanks @ceturc that worked great! |
Idea to resolve this for a broader audience: restore the previous behavior of setting the root logger level. I like the work done in #1277 and simply want to restore the old feature of setting the root logger level. If there's interest in this approach, I'll prepare a P/R for it. |
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed. |
Hi Zappa Maintainers - any interest in merging P/R #1347 to fix this issue introduced in 0.59.0? |
Context
Hi there!
I'm using zappa on a project for more than 3 years, so first of all thanks for your hard work!
On my last deployment, I've upgraded zappa version from 0.58.0 to 0.59.0 (python 3.8/django 4.1.9/aws lambda), and form that time I stopped from see the access logs of the HTTP server in the aws cloudwatch logs
Expected Behavior
zappa tail STAGE
should show access logsActual Behavior
zappa tail STAGE
doesn't show access log, the access logs are not available in the AWS cloudwatchPossible Fix
Steps to Reproduce
Your Environment
amazon/aws-lambda-python:3.8
dockerpip freeze
:zappa_settings.json
:The text was updated successfully, but these errors were encountered: