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

feat(logger): introduce POWERTOOLS_DEBUG for internal debugging #1572

Conversation

heitorlessa
Copy link
Contributor

@heitorlessa heitorlessa commented Oct 5, 2022

Issue number: aws-powertools/powertools-lambda#86

Summary

Changes

Please provide a summary of what's being changed

Introduces a new environment variable POWERTOOLS_DEBUG to more easily enable internal debugging for Powertools operations.

User experience

Please share what the user experience looks like before and after this change

BEFORE

from aws_lambda_powertools.logging.logger import set_package_logger

set_package_logger() # 

AFTER

Simple use POWERTOOLS_DEBUG environment variable.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • Meet tenets criteria
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
  • PR title follows conventional commit semantics
  • Test warning messages for both POWERTOOLS_DEBUG and POWERTOOLS_DEV
  • Optimize strtobool for most common values "1" and "0" for speed
Is this a breaking change?

RFC issue number:

Checklist:

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

Acknowledgment

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

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.


View rendered docs/index.md

@heitorlessa heitorlessa requested a review from a team as a code owner October 5, 2022 09:23
@heitorlessa heitorlessa requested review from rubenfonseca and removed request for a team October 5, 2022 09:23
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 5, 2022
@boring-cyborg boring-cyborg bot added area/commons documentation Improvements or additions to documentation labels Oct 5, 2022
@github-actions github-actions bot added the feature New feature or functionality label Oct 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2022

Codecov Report

Base: 99.74% // Head: 99.65% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (9cb7a16) compared to base (f906ef7).
Patch coverage: 54.54% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1572      +/-   ##
===========================================
- Coverage    99.74%   99.65%   -0.09%     
===========================================
  Files          124      124              
  Lines         5772     5783      +11     
  Branches       656      658       +2     
===========================================
+ Hits          5757     5763       +6     
- Misses           8       11       +3     
- Partials         7        9       +2     
Impacted Files Coverage Δ
aws_lambda_powertools/package_logger.py 77.77% <50.00%> (-22.23%) ⬇️
aws_lambda_powertools/shared/functions.py 83.33% <50.00%> (-5.56%) ⬇️
aws_lambda_powertools/shared/constants.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pull-request-size pull-request-size bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 5, 2022
@boring-cyborg boring-cyborg bot added the tests label Oct 5, 2022
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 5, 2022
@heitorlessa heitorlessa self-assigned this Oct 5, 2022
@heitorlessa
Copy link
Contributor Author

heitorlessa commented Oct 5, 2022

merging as @rubenfonseca already approved changes earlier (stand-up) but is busy with V2 last Layer tests

@heitorlessa heitorlessa changed the title feat(logger): introduce POWERTOOLS_DEBUG to enable internal debugging feat(logger): introduce POWERTOOLS_DEBUG for internal debugging Oct 5, 2022
@heitorlessa heitorlessa merged commit 802bc41 into aws-powertools:develop Oct 5, 2022
@heitorlessa heitorlessa deleted the feat/introduce-powertools-debug branch October 5, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature New feature or functionality size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants