logger_logstash_backend icon indicating copy to clipboard operation
logger_logstash_backend copied to clipboard

Bad value on output port 'udp_inet'

Open mvalitov opened this issue 6 years ago • 2 comments

thanks for the library! I use the elixir version 1.6, and from time to time I get the following error: 2018-12-11 11:56:53.657 [error] Bad value on output port 'udp_inet' Do you have any thoughts on this?

mvalitov avatar Dec 11 '18 09:12 mvalitov

I can reliably reproduce this:

iex(1)> require Logger
Logger
iex(2)> Logger.info("ɓ")
:ok
iex(3)> 
11:37:38.162 pid=<0.3159.0> line=2 file=iex [info]  ɓ
 
11:37:38.163 pid=<0.2656.0> [error] Bad value on output port 'udp_inet'

I think this issue might actually be related to this issue:

kenny-evitt avatar Dec 11 '19 16:12 kenny-evitt

The changes in pull request #26 resolve this error for me. Those changes allow options to be passed along to exjsx. I modified the config for this backend in my project to include this new option:

  ex_jsx_opts: [:uescape]

and then:

iex(6)> Logger.info("ɓ")                  
:ok
iex(7)> 
12:09:44.201 pid=<0.3256.0> line=6 file=iex [info]  ɓ

and in Logstash:

2019-12-11T17:09:44.201Z 127.0.0.1 ɓ

kenny-evitt avatar Dec 11 '19 17:12 kenny-evitt