Skip to content

Key have been removed from logger in lambda layer #1087

Closed
@HAK-CODE

Description

@HAK-CODE

What were you trying to accomplish?
Was trying to filter logs based on log level i.e INFO, WARN etc

Expected Behavior

arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:7

{
    "level": "INFO",
    "location": "lambda_handler:44",
    "message": "info message",
    "timestamp": "2022-04-01 04:41:43,576+0000",
    "service": "state-monitoring-service",
    "cold_start": true,
    "function_name": "site-state-monitoring-service",
    "function_memory_size": "128",
    "function_arn": "arn:aws:lambda:us-east-2:xxxxxxxxxxx:function:site-state-monitoring-service",
    "function_request_id": "2b37a8b5-35d0-47e7-baf9-6ee75c531c60",
    "xray_trace_id": "1-62468286-269844d9186d7242176fb362"
}

Current Behavior

arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:15

{
    "message": "info message",
    "service": "state-monitoring-service",
    "cold_start": true,
    "function_name": "site-state-monitoring-service",
    "function_memory_size": "128",
    "function_arn": "arn:aws:lambda:us-east-2:xxxxxxxxxxx:function:site-state-monitoring-service",
    "function_request_id": "cc1eba4c-3033-4112-9361-afaf028e22b5",
    "xray_trace_id": "1-624681d2-6b01a06a0559627628346348"
}

Current Behavior

Keys missing in current layer arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:15

level
location
timestamp

Steps to Reproduce (for bugs)

  1. Set the current layer arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:15

Environment

  • Powertools version used: via Layer
  • Packaging format (Layers, PyPi): arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:15
  • AWS Lambda function runtime: 3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions