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(feature-flags): Bring your own logger for debug #709

Merged
merged 17 commits into from
Oct 1, 2021

Conversation

gwlester
Copy link
Contributor

@gwlester gwlester commented Sep 28, 2021

Issue #, if available: #702

Description of changes:

Added logger parameter to initialization routines with a default of None.
If defaulted, a logger will be created.

Checklist

Breaking change checklist

RFC issue #702:

  • 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 and others added 6 commits August 22, 2021 08:45
* fix/idempotency-hash-order:
  fix(idempotency): sorting keys before hashing
…tools-python into develop

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  docs(event-handler): document catch-all routes (aws-powertools#705)
  chore: add python 3.9 support
  docs: add team behind it and email
  ISSUE-693: Use ExpressionAttributeNames in _put_record (aws-powertools#697)
  feat(validator): include missing data elements from a validation error (aws-powertools#686)
  chore(deps-dev): bump mkdocs-material from 7.2.8 to 7.3.0 (aws-powertools#695)
  chore(deps-dev): bump mkdocs-material from 7.2.6 to 7.2.8 (aws-powertools#682)
  chore(deps-dev): bump flake8-bugbear from 21.4.3 to 21.9.1 (aws-powertools#676)
  chore(deps): bump boto3 from 1.18.38 to 1.18.41 (aws-powertools#677)
  chore(deps-dev): bump radon from 4.5.2 to 5.1.0 (aws-powertools#673)
  chore(deps): bump boto3 from 1.18.32 to 1.18.38 (aws-powertools#671)
  refactor(data-classes): clean up internal logic for APIGatewayAuthorizerResponse (aws-powertools#643)
  fix(data-classes): use correct asdict funciton (aws-powertools#666)
  chore(deps-dev): bump xenon from 0.7.3 to 0.8.0 (aws-powertools#669)
  chore: bump to 1.20.2
  fix: Fix issue with strip_prefixes (aws-powertools#647)
  chore(deps-dev): bump mkdocs-material from 7.2.4 to 7.2.6 (aws-powertools#665)
  chore(deps): bump boto3 from 1.18.26 to 1.18.32 (aws-powertools#663)
  chore(deps-dev): bump pytest from 6.2.4 to 6.2.5 (aws-powertools#662)
  chore(license): Add THIRD-PARTY-LICENSES (aws-powertools#641)
@boring-cyborg boring-cyborg bot added area/utilities documentation Improvements or additions to documentation labels Sep 28, 2021
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 28, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 28, 2021

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.

heitorlessa and others added 3 commits October 1, 2021 13:38
…tools-python into develop

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  docs: Terraform reference for SAR Lambda Layer (aws-powertools#716)
  chore(deps-dev): bump flake8-bugbear from 21.9.1 to 21.9.2 (aws-powertools#712)
  chore(deps): bump boto3 from 1.18.49 to 1.18.51 (aws-powertools#713)
  chore(deps): bump boto3 from 1.18.41 to 1.18.49 (aws-powertools#703)
  chore(deps): bump codecov/codecov-action from 2.0.2 to 2.1.0 (aws-powertools#675)
Comment on lines 50 to 53
if logger == None:
self.logger = logging.getLogger(__name__)
else:
self.logger = logger
Copy link
Contributor

Choose a reason for hiding this comment

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

Since None is a falsy value, you can make this more compact by changing to:

self.logger = logger or logging.getLogger(__name__)

@heitorlessa
Copy link
Contributor

Thanks a lot for this! I'm adding type annotations so it's easier to understand that it can be either a standard logging OR our own Powertools Logger (Also std logging compliant)

* develop:
  feat(feature-flags): improve "IN/NOT_IN"; new rule actions (aws-powertools#710)
  feat(idempotency): makes customers unit testing easier (aws-powertools#719)
  feat(feature-flags): get_raw_configuration property in Store (aws-powertools#720)
  feat: boto3 sessions in batch, parameters & idempotency (aws-powertools#717)
  feat: add get_raw_configuration property in store; expose store
  fix(mypy): a few return types, type signatures, and untyped areas (aws-powertools#718)
  docs: Terraform reference for SAR Lambda Layer (aws-powertools#716)
  chore(deps-dev): bump flake8-bugbear from 21.9.1 to 21.9.2 (aws-powertools#712)
  chore(deps): bump boto3 from 1.18.49 to 1.18.51 (aws-powertools#713)
  fix(idempotency): sorting keys before hashing
@heitorlessa heitorlessa added the feature New feature or functionality label Oct 1, 2021
@heitorlessa heitorlessa changed the title feat(feature_flags): Allow bring your own logger to Feature Flags feat(feature_flags): Bring your own logger to Feature Flags Oct 1, 2021
@heitorlessa heitorlessa changed the title feat(feature_flags): Bring your own logger to Feature Flags feat(feature-flags): Bring your own logger for debug Oct 1, 2021
@heitorlessa heitorlessa merged commit 1845053 into aws-powertools:develop Oct 1, 2021
heitorlessa added a commit to heitorlessa/aws-lambda-powertools-python that referenced this pull request Oct 1, 2021
@heitorlessa heitorlessa removed the documentation Improvements or additions to documentation label Oct 5, 2021
@gwlester gwlester deleted the feature-702 branch January 31, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants