I am trying to implement module for Kamailio by extending "topoh" module. I want to write something console so I know that module is correctly loaded and in use. For that purpose I am using logging functions LM_DBG
and LM_ERR
. In the following article http://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages stays that output from this functions goes to syslog but I can't see anything in my syslog. I am using command tail -F /var/log/syslog
for viewing syslog.
I am using default settings for debugging in my Kamailio config file. Is there something special that I must configure for view output from this logging functions in my syslog?
So, I was able to see output from LM_DBG and LM_ERR macros after changing debugging level to 3 in kamailio.cfg
. Than I put together this command to grep all my "logs" to log file:
kamailio 2>&1 >/dev/null | grep --line-buffered "name_of_your_module" > name_of_your_module.log
Than I can simply watch my debug information information live with command tail -F name_of_your_module.log
.
I hope that this help someone in the future.