Skip to content

API Gateway : Debug mode - print in multiple lines instead of a single one #972

Closed
@filol

Description

@filol

What were you trying to accomplish?
When I activate the debug mode for API Gateaway (https://awslabs.github.io/aws-lambda-powertools-python/1.24.2/core/event_handler/api_gateway/#debug-mode) it's spam my cloudwatch log. Instead havings a single entry with the object, it's creating a single entry for each line of input object.

Expected Behavior

One line
image

Current Behavior

One cloudwatch entry for each line of the object :
image

Steps to Reproduce (for bugs)

app = ApiGatewayResolver(debug=True) 

@logger.inject_lambda_context(correlation_id_path=correlation_paths.API_GATEWAY_REST)
def lambda_handler(event, context):
    return app.resolve(event, context)
    
@app.get("/api/v1/test")
def test():
    return "Hello"

Environment

  • Powertools version used: 1.24.1
  • Packaging format (Layers, PyPi):
  • AWS Lambda function runtime: Python 3.9 - Graviton

How to enable debug mode**

# paste logs here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions