Closed
Description
My logs are appearing twice in CloudWatch: once in a structured format and once unstructured.
I'd only like to have the structured logs.
I didn't see this behavior before so it might be something on my side.
Expected Behavior
Having the logs once in structured format.
Current Behavior
Having the logs both structured and unstructured.
Environment
- Powertools version used: 1.1.2
- AWS Lambda function runtime: Python
- Debugging logs
Powertools is setup like this:
from aws_lambda_powertools import Logger, Tracer, Metrics
from aws_lambda_powertools.metrics import MetricUnit
logger = Logger()
tracer = Tracer()
metrics = Metrics()
@metrics.log_metrics
@logger.inject_lambda_context
@tracer.capture_lambda_handler
def handle(event, context):
...
logger.info('validated')
Seems like the root logger is still capturing and logging.
Why do I have duplicate logs? What am I missing here?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Triage