title: Ejabberd debugging
body: <p>I want to make some debugging to a Ejabberd module I am working on; however, as I am working on Windows the best option I have is to do just by logging. </p>
  
  <p>I can't make work the logging. I am using <code>error_logger:warning_msg("here!")</code> however I can't see this in the logs.</p>
  
  <p>I have checked <code>ejabberd.log</code> and <code>error.log</code>.</p>
  
  <p>Any ideas of debugging or logging for ejabberd are welcome. As I have said I am working on Windows.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I changed my code and now looks like this:</p>
  
  <pre><code>start(Host, Opts) -&gt;
      ?DEBUG("Starting: ~p ~p", [Host, Opts]),
      Proc = gen_mod:get_module_proc(Host, ?MODULE),
      ChildSpec = {
          Proc,
          {?MODULE, start_link, [Host, Opts]},
          transient,
          1000,
          worker,
          [?MODULE]
      },
      supervisor:start_child(ejabberd_sup, ChildSpec).
  </code></pre>
  
  <p>But I am getting this error</p>
  
  <pre><code>2015-09-14 17:01:11.863 [critical] &lt;0.37.0&gt;@gen_mod:start_module:107 Problem starting the module mod_restful for host &lt;&lt;"fernando"&gt;&gt; 
   options: [{api,[[{path,[&lt;&lt;"admin"&gt;&gt;]},
                    {module,mod_restful_admin},
                    {params,[{key,&lt;&lt;"secret"&gt;&gt;},
                             {allowed_commands,[register,unregister]}]}],
                   [{path,[&lt;&lt;"register"&gt;&gt;]},
                    {module,mod_restful_register},
                    {params,[{key,&lt;&lt;"secret"&gt;&gt;}]}]]}]
   error: undef
  [{p1_logger,debug_msg,[mod_restful,80,"Starting: ~p ~p",["fer","fer"]],[]},
   {mod_restful,start,2,
                [{file,"d:/Sites/mod_restful/src/mod_restful.erl"},{line,80}]},
   {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}]}]
  2015-09-14 17:01:11.863 [critical] &lt;0.37.0&gt;@gen_mod:start_module:112 ejabberd initialization was aborted because a module start failed.
  </code></pre>