modular_muc
modular_muc copied to clipboard
mod_muc_log errors instead of logging
Hi there. I pulled the master branch, built according to instructions and installed it into my instance of ejabberd. I reloaded the modules from the webadmin and got similar results so I restarted ejabberd to make sure. It appears that with mod_muc and mod_muc_log disagree on the communication protocol. I am using ejabberd 2.1.3 on erlang R13b with mod_muc and mod_muc_log configured configured as:
{mod_muc, [ %%{host, "conference.@HOST@"}, {access, muc}, {access_create, muc}, {access_persistent, muc}, {access_admin, muc_admin}, {max_users, 500} ]}, {mod_muc_log,[ {outdir, "/var/log/ejabberd/muclogs"} ]},
The outdir /var/log/ejabberd/muclogs
is chown ejabberd:adm, owner and group writable, and ejabberd runs as the ejabberd user.
When the room is created, there is no problem.
=INFO REPORT==== 2010-09-16 09:37:19 ===
I(<0.418.0>:mod_muc_room:149) : Created MUC room [email protected] by user@localhost/luxuria
Then, when logging is enabled, we see the first error in ejabberd.log:
=ERROR REPORT==== 2010-09-16 09:37:32 === E(:mod_muc_log:173) : {badarg, [{lists,keysearch, [title,1, {state,"chat","conference.localhost", "localhost", {muc,muc,muc_admin,muc}, muc_storage_default,muc_room_default, {jid,"chat","conference.localhost",[], "chat","conference.localhost",[]}, {config,[],[],true,true,true,true,true, false,200,true,true,true,false,true, false,false,false,[],true,true,[]}, {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[], [[{"user","localhost","luxuria"}| {user, {jid,"user","localhost", "luxuria","user","localhost", "luxuria"}, "user",moderator, {xmlelement,"presence", [{"xml:lang","en"}, {"to", "[email protected]/user"}], [{xmlelement,"priority",[], [{xmlcdata,>}]}, {xmlelement,"c", [{"xmlns", "http://jabber.org/protocol/caps"}, {"node", "http://psi-im.org/caps"}, {"ver","0.13-dev-rev2"}, {"ext","cs ep-notify html"}], []}]}}]], [],[],[]}}}, {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}}}, {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}, {{[[{"user","localhost",[]}|owner]], [],[],[],[],[],[],[],[],[],[],[],[],[], [],[]}}}, {lqueue,{[],[]},0,20}, [],[],false,nil,none, {[],[]}}]}, {mod_muc_log,get_room_info,2}, {mod_muc_log,add_message_to_log,5}, {mod_muc_log,handle_cast,2}, {gen_server,handle_msg,5}, {proc_lib,init_p_do_apply,3}]}
And upon saying something ('test'), we get the following error:
=ERROR REPORT==== 2010-09-16 09:40:24 === E(:mod_muc_log:173) : {badarg, [{lists,keysearch, [title,1, {state,"chat","conference.localhost", "localhost", {muc,muc,muc_admin,muc}, muc_storage_default,muc_room_default, {jid,"chat","conference.localhost",[], "chat","conference.localhost",[]}, {config,[],[],true,true,true,true,true, false,200,true,true,true,false,true, false,false,false,[],true,true,[]}, {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[], [[{"user","localhost","luxuria"}| {user, {jid,"user","localhost", "luxuria","user","localhost", "luxuria"}, "user",moderator, {xmlelement,"presence", [{"xml:lang","en"}, {"to", "[email protected]/user"}], [{xmlelement,"priority",[], [{xmlcdata,>}]}, {xmlelement,"c", [{"xmlns", "http://jabber.org/protocol/caps"}, {"node", "http://psi-im.org/caps"}, {"ver","0.13-dev-rev2"}, {"ext","cs ep-notify html"}], []}]}}]], [],[],[]}}}, {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}}}, {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}, {{[[{"user","localhost",[]}|owner]], [],[],[],[],[],[],[],[],[],[],[],[],[], [],[]}}}, {lqueue,{[],[]},0,20}, [],[],false,nil,none, {[],[]}}]}, {mod_muc_log,get_room_info,2}, {mod_muc_log,add_message_to_log,5}, {mod_muc_log,handle_cast,2}, {gen_server,handle_msg,5}, {proc_lib,init_p_do_apply,3}]}
Hi Aaron,
Thank you for you feedback. Yes, modular_muc is unfortunately not compatible with mod_muc_log.
The code is a bit abandoned, but you can find a more recent version here : http://github.com/cstar/ejabberd/tree/cloud/src/mod_muc/
It is still not compatible with modular_muc, but the code is better !
Ok, good to know this is a known incompatibility. I had figured the mod_muc_log bundled with modular_muc would pick up the new log parameters that appear to be used.
Yeah, sorry about that. I had a plan to port it to modular_muc, but never got around it.