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

fix: regression 104 #105

Merged
merged 9 commits into from
Aug 14, 2020

Conversation

heitorlessa
Copy link
Contributor

@heitorlessa heitorlessa commented Aug 14, 2020

Issue #, if available: #105 104

Description of changes:

Corrects regression where Logger constructor wasn't taking int as a level.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@heitorlessa heitorlessa self-assigned this Aug 14, 2020
@heitorlessa heitorlessa changed the title fix/regression 104 fix: regression 104 Aug 14, 2020
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2020

Codecov Report

Merging #105 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #105   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          497       499    +2     
  Branches        45        46    +1     
=========================================
+ Hits           497       499    +2     
Impacted Files Coverage Δ
aws_lambda_powertools/logging/logger.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b808b1a...1c7418c. Read the comment docs.

""" Returns preferred log level set by the customer in upper case """
if isinstance(level, int):
return level

log_level: str = level or os.getenv("LOG_LEVEL")
Copy link

Choose a reason for hiding this comment

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

The docstring on line 47 above declares the LOG_LEVEL environment variable as capable of accepting an integer. That probably needs to be handled here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

handling that in another PR before publishing it, as the test didn't go through

@heitorlessa heitorlessa merged commit 4573716 into aws-powertools:develop Aug 14, 2020
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