INFO_MSG方法在ejabberd中失败 [英] INFO_MSG method fails in ejabberd

查看:228
本文介绍了INFO_MSG方法在ejabberd中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 ejabberd XMPP服务器中编写自定义模块。这是我写的erl模块。

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.

我可以编译它没有任何错误。但是,在将此模块添加到配置文件并重新启动ejabberd服务器后,服务不会启动。它说

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日志不说任何东西。如果我删除行

?INFO_MSG(加载模块mod_wish,[]),那么它可以工作。大型日志记录框架是否存在问题?我如何使这个正确?任何人都可以帮助我我是全新的erlang。

谢谢

.
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

推荐答案

如果你使用ejabberd 13.12。您应该将文件放在 ejabberd / src / 中,然后使用整个服务器进行编译。

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

这篇关于INFO_MSG方法在ejabberd中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆