Skip to content

Commit

Permalink
don't blow up if passed an unexpected value
Browse files Browse the repository at this point in the history
  • Loading branch information
rubysolo authored and navinpeiris committed May 3, 2020
1 parent 3230808 commit f7f1ae0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/logster/string_formatter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ defmodule Logster.StringFormatter do
defp format_value(value) when is_float(value), do: :erlang.float_to_binary(value, decimals: 3)
defp format_value(value) when is_atom(value) or is_integer(value), do: to_string(value)
defp format_value(value) when is_map(value), do: Jason.encode!(value)
defp format_value(_), do: "(unprintable)"
end

0 comments on commit f7f1ae0

Please sign in to comment.