erlang error log library extract from ejabberd