Open navjeetc opened 8 years ago
Have you tried deleting all the logging code?
This code was created quite a few versions ago.
Sent from my iPhone
On 8 Jan 2016, at 04:37, Navjeet notifications@github.com wrote:
I was compile a beam file after modifying line 14 from -include("ejabberd.hrl"). to -include("logger.hrl").
but now when start ejabberd I get the error
options: [] error: undef [{p1_logger,info_msg, [mod_add_timestamp,18,"starting mod_add_timestamp",[]], []}, {mod_add_timestamp,start,2, [{file,"/home/ec2-user/ejabberd_add_timestamp/mod_add_timestamp.erl"}, {line,18}]}, {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,99}]}, {lists,foreach,2,[{file,"lists.erl"},{line,1336}]}, {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,72}]}, {application_master,start_it_old,4, [{file,"application_master.erl"},{line,272}]}] 2016-01-08 04:34:32.895 [critical] <0.38.0>@gen_mod:start_module:112 ejabberd initialization was aborted because a module start failed. I am Erlang newbie so any suggestions to fix this will be helpful
— Reply to this email directly or view it on GitHub.
Actually I got the logging code working but now the code to pattern match the packet is not extracting message type, I will provide more info tonight
Ok the whole packet being printed by debug statement is
2016-01-09 06:15:53.749 [debug] <0.589.0>@mod_add_timestamp:on_filter_packet:33 on_filter_packet {{jid,<"lobby-ae588d0b-5264-4fb5-8d00-3ad390bd7c0b">>,<<"conference.chat.myserver.io">>,<<"uberchopper">>,<<"lobby-ae588d0b-5264-4fb5-8d00-3ad390bd7c0b">>,<<"conference.chat.myserver.io">>,<<"uberchopper">>},{jid,<<"17033143955uberchopper">>,<<"chat.myserver.io">>,<<"uberchopper">>,<<"17033143955uberchopper">>,<<"chat.myserver.io">>,<<"uberchopper">>},{xmlel,<<"message">>,[{<<"to">>,<<"lobby-ae588d0b-5264-4fb5-8d00-3ad390bd7c0b@conference.chat.myserver.io">},{<<"type">>,<<"groupchat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test">>}]},{xmlel,<<"profile">>,[{<<"xmlns">>,<<"selfie:data">>}],[{xmlel,<<"profileImageURL">>,[],[]},{xmlel,<<"age">>,[],[{xmlcdata,<<"0">>}]},{xmlel,<<"gender">>,[],[]},{xmlel,<<"message">>,[],[]}]}]}}
And XML part of the packet is:
2016-01-09 06:15:53.750 [debug] <0.589.0>@mod_add_timestamp:on_filter_packet:34 on_filter_packet {xmlel,<"message">>,[{<<"to">>,<<"lobby-ae588d0b-5264-4fb5-8d00-3ad390bd7c0b@conference.chat.myserver.io">},{<<"type">>,<<"groupchat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test">>}]},{xmlel,<<"profile">>,[{<<"xmlns">>,<<"selfie:data">>}],[{xmlel,<<"profileImageURL">>,[],[]},{xmlel,<<"age">>,[],[{xmlcdata,<<"0">>}]},{xmlel,<<"gender">>,[],[]},{xmlel,<<"message">>,[],[]}]}]}
BTW I only need this for group chat for now, so I will modify the code to look for type = groupchat, after XML is being extracted properly
Hi all
Navjeetc did you fix trouble and add supporting groupchat? I use ejabberd 16.0
No, I did not
But for single chat work correct? Because I do not have correct work, timestamp didn't add
http://justcreative.com/2016/03/17/html5-vs-native-apps-whats-best-for-2016/
Sent from my iPhone
I was compile a beam file after modifying line 14 from -include("ejabberd.hrl"). to -include("logger.hrl").
but now when start ejabberd I get the error
options: [] error: undef [{p1_logger,info_msg, [mod_add_timestamp,18,"starting mod_add_timestamp",[]], []}, {mod_add_timestamp,start,2, [{file,"/home/ec2-user/ejabberd_add_timestamp/mod_add_timestamp.erl"}, {line,18}]}, {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,99}]}, {lists,foreach,2,[{file,"lists.erl"},{line,1336}]}, {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,72}]}, {application_master,start_it_old,4, [{file,"application_master.erl"},{line,272}]}] 2016-01-08 04:34:32.895 [critical] <0.38.0>@gen_mod:start_module:112 ejabberd initialization was aborted because a module start failed. I am Erlang newbie so any suggestions to fix this will be helpful