Question
ejabberd log files are not verbose enough for me, I want more information. How can I increase verbosity of ejabberd logs?
Answer
-
ejabberd 2.0.0 or higher
To enable debug-level verbosity on ejabberd logs, edit the configuration file ejabberd.cfg and add this line. Check the ejabberd Guide for more information.
{loglevel, 5}.
-
ejabberd 1.1.0 or higher
To enable debug-level verbosity on ejabberd logs, compile ejabberd with next command:
make ejabberd_debug=true
-
ejabberd 1.0.0 and older
To enable debug-level verbosity on ejabberd logs:
- Edit the file ejabberd/src/ejabberd.hrl and uncomment next line to enable the ejabberd_debug option:
-define(ejabberd_debug, true).
- Recompile and restart ejabberd.
- If everything went right, you will have more verbose log files.
- Edit the file ejabberd/src/ejabberd.hrl and uncomment next line to enable the ejabberd_debug option:
Increase log verbosity
You should add that this steps does not increase verbosity of main ejabberd.log.
At least at FreeBSD I have to start ejabberd not with standart rc script, but directly with
# su - ejabberd -c "/usr/local/bin/ejabberd -noshell -s"
to see debug messages at _console_.
The head of ejabberd.hrl confirms this:
DEBUG message = io:format()
INFO_MSG message = error_logger:info_msg()