We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccd882f commit 20e7f33Copy full SHA for 20e7f33
aws_lambda_powertools/logging/logger.py
@@ -235,14 +235,14 @@ def handler(event, context):
235
236
@functools.wraps(lambda_handler)
237
def decorate(event, context):
238
+ lambda_context = build_lambda_context_model(context)
239
+ cold_start = _is_cold_start()
240
+ self.structure_logs(append=True, cold_start=cold_start, **lambda_context.__dict__)
241
+
242
if log_event:
243
logger.debug("Event received")
244
self.info(event)
245
- lambda_context = build_lambda_context_model(context)
- cold_start = _is_cold_start()
-
- self.structure_logs(append=True, cold_start=cold_start, **lambda_context.__dict__)
246
return lambda_handler(event, context)
247
248
return decorate
0 commit comments