Skip to content

Commit

Permalink
log event,context,result
Browse files Browse the repository at this point in the history
  • Loading branch information
okigan committed Nov 29, 2023
1 parent f75b193 commit d0d04ef
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion services/pet-store/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
root_path='/prod' if 'LAMBDA_TASK_ROOT' in os.environ else '/'
)

handler = Mangum(app)
mangum_handler = Mangum(app)

def handler(event, context):
logger.info('Handling event: %s', event)
logger.info('Handling context: %s', context)

result = mangum_handler(event, context)

logger.info('Handling result: %s', result)

return result


@app.get("/")
Expand Down

0 comments on commit d0d04ef

Please sign in to comment.