-
Notifications
You must be signed in to change notification settings - Fork 429
improv adopt logging best practices #23
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
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
e1ee083
fix: set NullHandler for package logger
heitorlessa 976144d
improv: remove root logger logic, lib
heitorlessa ad408cd
fix: update exception type
heitorlessa 8978a2d
improv: propagate log level if set, null otherwise
heitorlessa fa2fd0e
fix: explicit wins over env var
heitorlessa 96c70d9
chore: fix test naming
heitorlessa 192047e
fix: exception logging
heitorlessa ed547be
improv: shorten log location
heitorlessa ea1a742
feat: add Logger class wrapper
heitorlessa fd9186b
improv: add deprecation warning
heitorlessa a60ad0e
BREAKING CHANGE: logger_setup, inject_lambda_ctx
heitorlessa 9be3735
improv: update tests
heitorlessa 4467cf6
improv: cover duplicated keys edge case
heitorlessa 220916b
improv: cover debug package logging
heitorlessa 3cc398e
improv: more coverage, linting
heitorlessa 447dc2b
improv: complete coverage, fix dead code
heitorlessa 9dc2c00
docs: update readme to reflect changes
heitorlessa 0e8dd84
fix: address jacob's code review feedback
heitorlessa 802f181
chore: linting
heitorlessa 9392afb
fix: metric spillover at 100, not 101
heitorlessa fd780be
fix: trace auto-disable, doc edge cases
heitorlessa bb1faf6
chore: linting
heitorlessa 83e58fa
chore: 0.8.0 version bump
heitorlessa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Top-level package for Lambda Python Powertools.""" | ||
import logging | ||
|
||
__author__ = """Amazon Web Services""" | ||
|
||
logger = logging.getLogger("aws_lambda_powertools") | ||
logger.addHandler(logging.NullHandler()) | ||
logger.propagate = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"""Logging utility | ||
""" | ||
from ..helper.models import MetricUnit | ||
from .logger import log_metric, logger_inject_lambda_context, logger_setup | ||
from .logger import Logger, log_metric, logger_inject_lambda_context, logger_setup | ||
|
||
__all__ = ["logger_setup", "logger_inject_lambda_context", "log_metric", "MetricUnit"] | ||
__all__ = ["logger_setup", "logger_inject_lambda_context", "log_metric", "MetricUnit", "Logger"] |
98 changes: 0 additions & 98 deletions
98
python/aws_lambda_powertools/logging/aws_lambda_logging.py
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class InvalidLoggerSamplingRateError(Exception): | ||
pass |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't they kind of already removed since those methods just raise an exception?