Is there a method to print variables into log messages? For example, something like this: instead of saying: if(method=="SUBSCRIBE") { log(1,"SUBSCRIBE\n"); } do this log(1,method)
which obviously doesn't work. It would be very helpful to be able to print out things like headers. Perhaps the select or more likely AVP functions will work in 0.10? Is there anything available now?
Mark
Check xlog module.
You can use something like the following :
xlog("L_NOTICE", "* Method=[%rm], From=<%fu>, IP=[%is]"); xlog("L_NOTICE", "* R-URI=<%ru>, To=[%tu]"); xlog("L_NOTICE", "* Call-ID=[%ci], CSeq=[%cs], UA=[%ua]");
Kostas
----- Original Message ----- From: "Mark Price" markprice@gmail.com To: serusers@iptel.org Sent: 26 October 2006 21:12 Subject: [Serusers] variables in log messages
Is there a method to print variables into log messages? For example, something like this: instead of saying: if(method=="SUBSCRIBE") { log(1,"SUBSCRIBE\n"); } do this log(1,method)
which obviously doesn't work. It would be very helpful to be able to print out things like headers. Perhaps the select or more likely AVP functions will work in 0.10? Is there anything available now?
Mark
--------------------------------------------------------------------------------
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers