logger doesn't work on my module
relbraun opened this issue · comments
Environment
- ejabberd version: 20.02.06
- Erlang version:
10.6.4
- OS: Linux (Debian)
- Installed from: source
I created a module in the local repository directory .ejabberd-modules
and put in the code the syntax:
-include("logger.hrl").
-include("xmpp.hrl").
-include("ejabberd_commands.hrl").
-include("mod_privacy.hrl").
-include("mod_last.hrl").
-include("translate.hrl").
-include("ejabberd_sql_pt.hrl").
...
start(Host, Opts) ->
?DEBUG("module xxxx started", []),
xmpp:register_codec(some_codec),
gen_iq_handler:add_iq_handler(ejabberd_local, Host,
?NS_WB_XROSTER, ?MODULE, process_sm_iq),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host,
?NS_WB_XROSTER, ?MODULE, process_sm_iq).
stop(Host) ->
xmpp:unregister_codec(some_codec),
gen_iq_handler:remove_iq_handler(ejabberd_local, Host,
?NS_WB_XROSTER),
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host,
?NS_WB_XROSTER).
depends(_Host, _Opts) ->
[].
mod_options(_Host) ->
[].
process_sm_iq() ->
?ERROR_MSG("some message", []),
xmpp:make_iq_result(IQ, Somestuff).
And I see nothing in the ejabberd.log
file
my mistake. It shouldn't be here...