processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 140 forks source link

Error in mod_logxml installation (ejabberd 18.12) #268

Closed andrescueva closed 5 years ago

andrescueva commented 5 years ago

I tried to install mod_logxml, but is I got an error. Do you know how to solve it?

user@ejabberd:~/ejabberd-18.12/bin$ ./ejabberdctl module_install mod_logxml

/home/dcuioit/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl:12: Warning: undefined callback function depends/2 (behaviour 'gen_mod')
/home/dcuioit/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl:12: Warning: undefined callback function mod_options/1 (behaviour 'gen_mod')
=ERROR REPORT==== 5-Feb-2019::16:36:34.691847 ===
Error in process <7529.3629.0> on node ejabberd@localhost with exit value:
{undef,[{jlib,timestamp_to_legacy,[{{2019,2,5},{21,36,34}}],[]},
        {mod_logxml,get_now_iso,1,
                    [{file,"/home/dcuioit/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl"},
                     {line,272}]},
        {mod_logxml,open_file,3,
                    [{file,"/home/dcuioit/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl"},
                     {line,215}]},
        {mod_logxml,init,7,
                    [{file,"/home/dcuioit/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl"},
                     {line,66}]}]}
badlop commented 5 years ago

I've committed a fix for the runtime error, so now it should work correctly, please try it and report here any other problems. There are still two compilation warnings, I'll fix them later, but don't affect its usage.