Skip to content

Commit

Permalink
Print summary of Lambda context in Pokemon service
Browse files Browse the repository at this point in the history
  • Loading branch information
unexge committed Nov 15, 2022
1 parent 6f43430 commit f55918d
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,17 @@ def get_pokemon_species(
input: GetPokemonSpeciesInput, context: Context
) -> GetPokemonSpeciesOutput:
if context.lambda_ctx is not None:
logging.debug("Lambda Context: %s", context.lambda_ctx)
logging.debug(
"Lambda Context: %s",
dict(
request_id=context.lambda_ctx.request_id,
deadline=context.lambda_ctx.deadline,
invoked_function_arn=context.lambda_ctx.invoked_function_arn,
function_name=context.lambda_ctx.env_config.function_name,
memory=context.lambda_ctx.env_config.memory,
version=context.lambda_ctx.env_config.version,
),
)
context.increment_calls_count()
flavor_text_entries = context.get_pokemon_description(input.name)
if flavor_text_entries:
Expand Down

0 comments on commit f55918d

Please sign in to comment.