<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>21 dec 2012 kl. 17:34 skrev Mino Haluz &lt;<a href="mailto:mino.haluz@gmail.com">mino.haluz@gmail.com</a>&gt;:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Ok I did it like this, every xlog I'm calling is in the form:<div><br></div><div>xlog("L_INFO","XLOG: $ci [ROUTENAME] debuginformation");&nbsp;</div><div><br></div><div>and also after every sql_query I have</div>
<div><br></div><div>xlog("L_INFO","XLOG: $ci [ROUTENAME] SQL: select * from ....");</div><div><br></div><div>and when SIP message is received/sent</div><div><br></div><div>xlog("L_INFO","XLOG: $ci [MAIN] $mb");</div>
<div>xlog("L_INFO","XLOG: $ci [event:onsend_route] $snd(buf)");<br></div><div><br></div><div>So when I'm vizualizing the siptrace, I can view all SQL queries, raw packets (it is done already by siptrace however) and additional debug logs associated to one particular callid.&nbsp;</div>
<div><br></div><div>The question is, has xlog maximum length of the second parameter ? Because when SIP message length exceed some value (around 1500bytes, maybe some relation to packet max size) it is stripped.&nbsp;</div><div>
So when calling&nbsp;xlog("L_INFO","XLOG: $ci [event:onsend_route] START $snd(buf) END"); and $snd(buf) is too big, it is stripped and END is not in the logs.</div></div></blockquote>Could be the syslog/rsyslog configuration. Check syslog. &nbsp;There's also a pv buffer size you can set in the kamailio configuration - check the core cookbook.</div><div><br></div><div>Kamailio xlog logs to your syslog daemon.</div><div><br></div><div>Guessing a bit here.</div><div>/O<br><blockquote type="cite"><div dir="ltr"><div><br></div><div>Are you aware of maximum length of this xlog message parameter? I cannot find it in documentation.&nbsp;</div>
<div><br></div><div>Mino.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 21, 2012 at 5:18 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 12/21/12 5:15 PM, Olle E. Johansson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
21 dec 2012 kl. 17:10 skrev Ovidiu Sas &lt;<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>&gt;:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you just want to control the debug level externally, take a look at<br>
the debug parameter:<br>
<a href="http://www.kamailio.org/wiki/cookbooks/3.3.x/core#debug" target="_blank">http://www.kamailio.org/wiki/<u></u>cookbooks/3.3.x/core#debug</a><br>
It can be controlled via sercmd (kamcmd in future versions).<br>
<br>
If you want to play with global flags, take a look at cfgutils:<br>
<a href="http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html" target="_blank">http://kamailio.org/docs/<u></u>modules/3.3.x/modules_k/<u></u>cfgutils.html</a><br>
<a href="http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html#id2533439" target="_blank">http://kamailio.org/docs/<u></u>modules/3.3.x/modules_k/<u></u>cfgutils.html#id2533439</a><br>
<a href="http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html#id2494518" target="_blank">http://kamailio.org/docs/<u></u>modules/3.3.x/modules_k/<u></u>cfgutils.html#id2494518</a><br>
<a href="http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html#id2494559" target="_blank">http://kamailio.org/docs/<u></u>modules/3.3.x/modules_k/<u></u>cfgutils.html#id2494559</a><br>
</blockquote>
<br>
For your own logs:<br>
<br>
I usually declare a shared variable called "debug" in the pv module modparams.<br>
<br>
When logging i do<br>
<br>
if ($shv(debug) &gt; 0)<br>
&nbsp; &nbsp; xlog(....)<br>
<br>
All shared variables, like Daniel said, can be changed with kamctl/sercmd.<br>
</blockquote></div>
More for the sake of archiving, one can even do:<br>
<br>
xlog("$shv(debug)", ...);<br>
<br>
and if $shv(debug) &gt; than the value of debug parameter, then the message is not printed, otherwise will be printed to the level corresponding to its value.<br>
<br>
Cheers,<br>
Daniel<div class="im HOEnZb"><br>
<br>
-- <br>
Daniel-Constantin Mierla - <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com</a><br>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/<u></u>miconda</a><br>
<br>
<br></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></blockquote></div><br></body></html>