Skip to content

Commit

Permalink
don't re-encode json in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
boringcactus committed Jan 23, 2024
1 parent 4ba234b commit 716b9d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/open_trip_planner_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ defmodule OpenTripPlannerClient do
response
end

defp status_text({:ok, %{status: code, body: body}}) do
string_body = Jason.encode!(body)
"status=#{code} content_length=#{byte_size(string_body)}"
defp status_text({:ok, %{status: code}}) do
"status=#{code}"
end

defp status_text({:error, error}) do
Expand Down

0 comments on commit 716b9d6

Please sign in to comment.