Ok I did it like this, every xlog I'm calling is in the form:
xlog("L_INFO","XLOG: $ci [ROUTENAME] debuginformation");
and also after every sql_query I have
xlog("L_INFO","XLOG: $ci [ROUTENAME] SQL: select * from ....");
and when SIP message is received/sent
xlog("L_INFO","XLOG: $ci [MAIN] $mb");
xlog("L_INFO","XLOG: $ci [event:onsend_route] $snd(buf)");
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.
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.
So when calling 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.
Are you aware of maximum length of this xlog message parameter? I cannot
find it in documentation.
Mino.
On Fri, Dec 21, 2012 at 5:18 PM, Daniel-Constantin Mierla <miconda(a)gmail.com
wrote:
On 12/21/12 5:15 PM, Olle E. Johansson wrote:
21 dec 2012 kl. 17:10 skrev Ovidiu Sas
<osas(a)voipembedded.com>om>:
If you just want to control the debug level externally, take a look at
For your own logs:
I usually declare a shared variable called "debug" in the pv module
modparams.
When logging i do
if ($shv(debug) > 0)
xlog(....)
All shared variables, like Daniel said, can be changed with kamctl/sercmd.
More for the sake of archiving, one can even do:
xlog("$shv(debug)", ...);
and if $shv(debug) > than the value of debug parameter, then the message
is not printed, otherwise will be printed to the level corresponding to its
value.
Cheers,
Daniel
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/**miconda<http://www.linkedin.com/in/miconda&…
______________________________**_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**users<http:/…