Closed dhaspden closed 4 years ago
Hi @dhaspden
I assume the reason for this is because Elixir 1.10 is adding an extra metadata field, domain
which is a list of atoms? I'm not sure if to_string([:foo, :bar])
was ever supported. I've tried on Elixir 1.6 and it fails there also.
Also is there a reason for the try
/rescue
solution?
Would a cleaner solution be this?
if is_list(v) or String.Chars.impl_for(v) == nil do
{"_#{k}", inspect(v)}
else
{"_#{k}", to_string(v)}
end
Hi @dhaspden I assume the reason for this is because Elixir 1.10 is adding an extra metadata field,
domain
which is a list of atoms? I'm not sure ifto_string([:foo, :bar])
was ever supported. I've tried on Elixir 1.6 and it fails there also.Also is there a reason for the
try
/rescue
solution?Would a cleaner solution be this?
if is_list(v) or String.Chars.impl_for(v) == nil do {"_#{k}", inspect(v)} else {"_#{k}", to_string(v)} end
That would be a possible solution as well. I will take some time and test that in our dev environment and see if that works as well. I'll get back to you on that.
Out in version 0.10.0
Sorry for the delay!
Elixir adds metadata to
Logger
automatically that breaks this library out-of-the-box on Elixir 1.10. It attempts to callto_string/1
on lists which is no longer supported. I have updatedlog_event/5
to now callinspect/1
on a list instead ofto_string/1
.For reference, this is the error that pops up when you try to use this library with Elixir 1.10.