Greetings,
Actually there is event simpler solution(s).
-
xmerl_scanhasquiet({quiet, Flag}) as one of the options. When set totruexmerl behaves and nothing get’s error-logged. Details are here: http://erlang.org/doc/man/xmerl_scan.html -
I was experiencing same issue with false error reporting as @jaimeiniesta. And that’s Elixir Logger capturing erlang’s
standard_errorand logs it with error level to configured Logger backends. See:handle_otp_reportsconfig option of the Elixir.Logger -
Solution with wrapping xmerl parsing in a separate process and setting group leader to stub GenServer didn’t work for me. But good implementation example could be found in ExUnit Capture logs/io sources: https://github.com/elixir-lang/elixir/blob/master/lib/ex_unit/lib/ex_unit/capture_io.ex
Cheers






















