Message logging problems

I'm trying to use either mod_message_log or mod_log_chat to log all messages. I got them installed, but now they both seem to have errors every time a message is sent. Here is the relevant log:

2015-09-11 13:31:31.528 [error] <0.3604.0>@ejabberd_hooks:run1:335 {undef,[{mod_log_chat,log_packet_send,[{jid,<<"mwallace2">>,<<"ccmtrading.com">>,<<"Matts-MacBook-Air">>,<<"mwallace2">>,<<"ccmtrading.com">>,<<"Matts-MacBook-Air">>},{jid,<<"mwallace">>,<<"ccmtrading.com">>,<<"Kopete">>,<<"mwallace">>,<<"ccmtrading.com">>,<<"Kopete">>},{xmlel,<<"iq">>,[{<<"type">>,<<"result">>},{<<"to">>,<<"mwallace@ccmtrading.com/Kopete">>},{<<"id">>,<<"aab9a">>}],[{xmlel,<<"query">>,[{<<"xmlns">>,<<"jabber:iq:version">>}],[{xmlel,<<"name">>,[],[{xmlcdata,<<"Adium">>}]},{xmlel,<<"version">>,[],[{xmlcdata,<<"1.5.10 (libpurple 2.10.9)">>}]}]}]}],[]},{ejabberd_hooks,safe_apply,3,[{file,"src/ejabberd_hooks.erl"},{line,385}]},{ejabberd_hooks,run1,3,[{file,"src/ejabberd_hooks.erl"},{line,332}]},{ejabberd_c2s,session_established2,2,[{file,"src/ejabberd_c2s.erl"},{line,1292}]},{p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
running hook: {user_send_packet,[{jid,<<"mwallace2">>,<<"ccmtrading.com">>,<<"Matts-MacBook-Air">>,<<"mwallace2">>,<<"ccmtrading.com">>,<<"Matts-MacBook-Air">>},{jid,<<"mwallace">>,<<"ccmtrading.com">>,<<"Kopete">>,<<"mwallace">>,<<"ccmtrading.com">>,<<"Kopete">>},{xmlel,<<"iq">>,[{<<"type">>,<<"result">>},{<<"to">>,<<"mwallace@ccmtrading.com/Kopete">>},{<<"id">>,<<"aab9a">>}],[{xmlel,<<"query">>,[{<<"xmlns">>,<<"jabber:iq:version">>}],[{xmlel,<<"name">>,[],[{xmlcdata,<<"Adium">>}]},{xmlel,<<"version">>,[],[{xmlcdata,<<"1.5.10 (libpurple 2.10.9)">>}]}]}]}]}

The undef at the beginning makes me think it can't find the module, but when I had that problem before (because the .beam file wasn't in the right place) ejabberd refused to start up.

I'm running ejabberd 15.03-1 installed from Debian stretch (testing). I initially tried to install the modules using the 'install-module' command but this didn't work (it appeared to succeed but the module didn't actually get installed). After this I grabbed contrib from the git repo and compiled the .beam files myself and copied them into the ebin directory.

I am not sure if Debian

I am not sure if Debian package is allowing you to properly add module with install-module.

You probably should either download ProcessOne installer or packages, build ejabberd yourself, or build and deploy the contribution yourself.

I installed from the binary

I installed from the binary installer and that got me a little further. mod_message_log now works, but it doesn't do what I want. When I try to run ejabberdctl module_install mod_log_chat I get:

src/mod_log_chat.erl:3: Warning: Non-UTF-8 character(s) detected, but no encoding declared. Encode the file in UTF-8 or add "%% coding: latin-1" at the beginning of the file. Retrying with latin-1 encoding.
Problem 'exit "Cannot load /opt/ejabberd-15.07/.ejabberd-modules/mod_log_chat/conf/mod_log_chat.yml: Syntax error on line 4 at position 8: mapping values are not allowed in this context"' occurred executing the command.
Stacktrace: [{ejabberd_config,exit_or_halt,1,
                              [{file,"src/ejabberd_config.erl"},{line,365}]},
             {ejabberd_config,include_config_file,2,
                              [{file,"src/ejabberd_config.erl"},{line,419}]},
             {lists,flatmap,2,[{file,"lists.erl"},{line,1248}]},
             {ejabberd_config,include_config_files,1,
                              [{file,"src/ejabberd_config.erl"},{line,383}]},
             {ejabberd_config,read_file,2,
                              [{file,"src/ejabberd_config.erl"},{line,123}]},
             {ejabberd_config,load_file,1,
                              [{file,"src/ejabberd_config.erl"},{line,141}]},
             {ext_mod,install,1,[{file,"src/ext_mod.erl"},{line,167}]},
             {ejabberd_commands,execute_command2,2,
                                [{file,"src/ejabberd_commands.erl"},
                                 {line,320}]}]

It seems a bug in the

It seems a bug in the configuration or configuration handling.
I have created a ticket for you here: Cannot start mod_log_chat.erl with included configuration

Syndicate content