Skip to content

feat(feature-flags): Bring your own logger for debug #709

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

Merged
merged 17 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
96cbdc1
fix(idempotency): sorting keys before hashing
heitorlessa Aug 22, 2021
b9fa07a
Merge branch 'fix/idempotency-hash-order' into develop
heitorlessa Aug 22, 2021
06c3250
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Sep 28, 2021
573ef89
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Sep 28, 2021
4d7cf6b
Add logger to class inits.
Sep 28, 2021
dd6f67f
Updated documentation
Sep 28, 2021
97d5f96
Update aws_lambda_powertools/utilities/feature_flags/appconfig.py
gwlester Sep 30, 2021
29633dc
Update aws_lambda_powertools/utilities/feature_flags/feature_flags.py
gwlester Sep 30, 2021
fd516d2
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Oct 1, 2021
dc14b5e
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Oct 1, 2021
1233966
Add missing period to logger.debug
Oct 1, 2021
3d4305b
feat: add get_raw_configuration property in store; expose store
heitorlessa Oct 1, 2021
3493789
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Oct 1, 2021
d0bd984
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Oct 1, 2021
5e9b208
Merge branch 'develop' into feature-702
heitorlessa Oct 1, 2021
93f8a5c
fix: type annotation, clarify logger in docs
heitorlessa Oct 1, 2021
370d9ca
fix: remove logger from staticmethod
heitorlessa Oct 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aws_lambda_powertools/utilities/feature_flags/appconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def __init__(
JMESPath expression to pluck feature flags data from config
jmespath_options : Optional[Dict]
Alternative JMESPath options to be included when filtering expr
logger: A logging object
Used to log messages. If None is supplied, one will be created.
"""
super().__init__()
if logger == None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def __init__(self, store: StoreProvider, logger=None):
----------
store: StoreProvider
Store to use to fetch feature flag schema configuration.
logger: A logging object
Used to log messages. If None is supplied, one will be created.
"""
self._store = store
if logger == None:
Expand Down
1 change: 1 addition & 0 deletions docs/utilities/feature_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ Parameter | Default | Description
**max_age** | `5` | Number of seconds to cache feature flags configuration fetched from AWS AppConfig
**sdk_config** | `None` | [Botocore Config object](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html){target="_blank"}
**jmespath_options** | `None` | For advanced use cases when you want to bring your own [JMESPath functions](https://github.com/jmespath/jmespath.py#custom-functions){target="_blank"}
**logger** | `None` | Logger to use. If None is supplied, then a logger will be created.

=== "appconfig_store_example.py"

Expand Down