-
Notifications
You must be signed in to change notification settings - Fork 429
Bug: Logger constructor ignores level
argument after first call
#5591
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hello @dennis-benchling ! |
Hey @dennis-benchling! I'm closing this issue as "not a bug" and please reopen if you need. |
|
Expected Behaviour
According to the docs, we should be able to set the log level explicitly through the
level
parameter toLogger
.Current Behaviour
The
level
parameter is properly set the first time you instantiateLogger
, but subsequent instantiations with the same service name will not set the log level. (It will always be the original value from the first instance.)Code snippet
Possible Solution
In
Logger._init_logger
,setLevel
should be called before the early return.Steps to Reproduce
Run the following code:
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.8
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: