jschniper / gelf_logger

An Elixir Logger backend for GELF
MIT License
29 stars 27 forks source link

Use IO.inspect instead of to_string so it immediately works for most data types (eg PIDs) #14

Closed tverlaan closed 6 years ago

tverlaan commented 6 years ago

We are logging PIDs and that doesn't work with to_string

jschniper commented 6 years ago

I made a couple of modifications. I switched from IO.inspect to Kernel.inspect and I'm checking String.Chars.impl_for the data type and using to_string if it is available and only using inspect if it isn't.

I have pushed the code with the tag 0.7.4 but I haven't pushed it to hex just yet. Please give it a try and let me know if it fits your needs.

jschniper commented 6 years ago

@tverlaan, wanted to check in with you and see if you had given this a try. I'll go ahead and push it to hex when I hear back from you.

tverlaan commented 6 years ago

Hi @jschniper, we're using this version right now and it works perfectly! Thanks!

jschniper commented 6 years ago

Pushed the new version to hex. Thank you!