INFO_MSG method fails in ejabberd

自闭症网瘾萝莉.ら 提交于 2019-12-11 08:46:53

问题


I am trying to write a custom module in ejabberd XMPP server. This is the erl module i'v written.

-module(mod_wish). 
-behavior(gen_mod).
-include("logger.hrl").
-export([
   start/2,
   stop/1
 ]).
 start(_Host, _Opt) ->
    ?INFO_MSG("Loading module 'mod_wish' ", []),
    ok.
 stop(_Host) ->
    ok.

I can compile it without any errors. But after i add this module to config file and restart the ejabberd server, serve does not start. it says

C(<0.38.0>:gen_mod:75) : Problem starting the module mod_wish for host "localhost"

.
Erlang log does not say anything. If i remove the line
?INFO_MSG("Loading module 'mod_wish' ", []), then it works. Is it a problem with lager logging framework? How can i make this correct? Can any one help me. I am totally new to erlang.
Thanks


回答1:


If you are using ejabberd 13.12. You should put your file in ejabberd/src/, then compile it with entire server.



来源:https://stackoverflow.com/questions/23673914/info-msg-method-fails-in-ejabberd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!