ejabberd - Comments for "gen_mod:start_module:78 Problem starting the module my_module for host &amp;lt;&amp;lt;&amp;quot;localhost&amp;quot;&amp;gt;&amp;gt;" https://www.ejabberd.im/node/18112 en I had the same issue. To fix https://www.ejabberd.im/node/18112#comment-66262 <p>I had the same issue. To fix it, add the following to your module source code after the "export" function:</p> <p>-ifndef(LAGER).<br /> -define(LAGER, 1).<br /> -endif.</p> Sat, 24 Oct 2015 00:24:07 +0000 yuvalt comment 66262 at https://www.ejabberd.im Hi, I'm not sure if this https://www.ejabberd.im/node/18112#comment-63910 <p>Hi,</p> <p>I'm not sure if this would still be helpful, but I encountered the same problem you did. I followed the same tutorial you followed (<noindex><a href="http://metajack.im/2008/08/28/writing-ejabberd-modules-presence-storms/" title="http://metajack.im/2008/08/28/writing-ejabberd-modules-presence-storms/" rel="nofollow" >http://metajack.im/2008/08/28/writing-ejabberd-modules-presence-storms/</a></noindex>). I have outlined the steps I took to solve it below:</p> <p>1. I couldn't get the simple module below to run with the ejabberd-13.12 without the ejabberd_logger error, so I decided to compile ejabberd from source (<noindex><a href="https://github.com/processone/ejabberd" title="https://github.com/processone/ejabberd" rel="nofollow" >https://github.com/processone/ejabberd</a></noindex>).<br /> 2. I added <code>-define(LAGER, 1).</code> to ejabberd/include/logger.hrl<br /> 3. Then, I compiled the code below using the command <code>erlc -I ejabberd/include/ -pa ejabberd/deps/lager/ebin mod_test.erl </code><br /> 4. I copied the generated mod_test.beam file to /lib/ejabberd/ebin/.<br /> 5. I started ejabberd with the command <code> sudo ejabberdctl start</code> and it worked without the error. </p> <p>I hope this helps. (FYI - I'm running Ubuntu 13.04).</p> <p>Cheers.</p> <div class="codeblock"><code>-module(mod_test). <p>-behaviour(gen_mod).</p> <p>-include(&quot;logger.hrl&quot;).</p> <p>-export([start/2, stop/1]).</p> <p>start(_Host, _Opts) -&gt;<br /> ?INFO_MSG(&quot;mod_test starting&quot;, []),<br />&nbsp;&nbsp;&nbsp; ok.</p> <p>stop(_Host) -&gt;<br /> ?INFO_MSG(&quot;mod_test stopping&quot;, []),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ok.</p></code></div> Sun, 20 Apr 2014 03:50:13 +0000 iRuth comment 63910 at https://www.ejabberd.im