Skip to content

Commit

Permalink
Merge pull request #166 from ministryofjustice/SP-2339
Browse files Browse the repository at this point in the history
SP-2339 - Correct JSON encoding in API Gateway logs #patch
  • Loading branch information
sixdaysandy authored Sep 24, 2024
2 parents eb8884b + a345e03 commit 5762d51
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions terraform/environment/modules/stage/stage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ resource "aws_api_gateway_stage" "currentstage" {
destination_arn = aws_cloudwatch_log_group.lpa_data.arn
format = join("", [
"{\"requestId\":\"$context.requestId\",",
"\"ip\":\"$context.identity.sourceIp\"",
"\"caller\":\"$context.identity.caller\"",
"\"user\":\"$context.identity.user\"",
"\"requestTime\":\"$context.requestTime\"",
"\"httpMethod\":\"$context.httpMethod\"",
"\"resourcePath\":\"$context.resourcePath\"",
"\"status\":\"$context.status\"",
"\"protocol\":\"$context.protocol\"",
"\"ip\":\"$context.identity.sourceIp\",",
"\"caller\":\"$context.identity.caller\",",
"\"user\":\"$context.identity.user\",",
"\"requestTime\":\"$context.requestTime\",",
"\"httpMethod\":\"$context.httpMethod\",",
"\"resourcePath\":\"$context.resourcePath\",",
"\"status\":\"$context.status\",",
"\"protocol\":\"$context.protocol\",",
"\"responseLength\":\"$context.responseLength\"}"
])
}
Expand Down

0 comments on commit 5762d51

Please sign in to comment.