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 committed May 1, 2020
1 parent b0d5bb3 commit f08381b
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 f08381b

Please sign in to comment.