From 89256bbbd8ad05da2058a47e72dc0e6c1172c33d Mon Sep 17 00:00:00 2001 From: Bernard Duggan Date: Mon, 3 Aug 2020 21:36:44 +1000 Subject: [PATCH] Fix logging crash when commited data is not a string (#62) --- lib/ecto_adapters_dynamodb.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ecto_adapters_dynamodb.ex b/lib/ecto_adapters_dynamodb.ex index c5ff75e..82ef876 100644 --- a/lib/ecto_adapters_dynamodb.ex +++ b/lib/ecto_adapters_dynamodb.ex @@ -1181,7 +1181,7 @@ defmodule Ecto.Adapters.DynamoDB do depth = opts[:depth] || 4 colours = Application.get_env(:ecto_adapters_dynamodb, :log_colours) d = DateTime.utc_now - formatted_message = "#{d.year}-#{d.month}-#{d.day} #{d.hour}:#{d.minute}:#{d.second} UTC [Ecto dynamo #{level}] #{message}" + formatted_message = "#{d.year}-#{d.month}-#{d.day} #{d.hour}:#{d.minute}:#{d.second} UTC [Ecto dynamo #{level}] #{inspect message}" {:ok, log_message} = Jason.encode(%{message: formatted_message, attributes: chisel(attributes, depth)}) if Application.get_env(:ecto_adapters_dynamodb, :log_in_colour) do