For line number:

  xlogl([ [facility,] level,] format)

Similar to xlog(), in addition prints configuration file line number at the 
beginning of message. 
https://kamailio.org/docs/modules/5.5.x/modules/xlog.html#xlog.f.xlogl




Ben Kaufman


-----Original Message-----
From: sr-users <[email protected]> On Behalf Of Chad
Sent: Wednesday, January 19, 2022 9:17 AM
To: Kamailio (SER) - Users Mailing List <[email protected]>; marek 
<[email protected]>
Subject: Re: [SR-Users] kamailio log dialog correlation

I wanted the same thing only with line number, in the end I had to do a global 
search and replace, I could not get it to work via a global param.
I even tried xlogl which just threw errors that no such command existed (even 
though it is listed in the docs: 
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fkamailio.org%2Fdocs%2Fmodules%2F5.0.x%2Fmodules%2Fxlog.html%23xlog.f.xlogl&amp;data=04%7C01%7Cbkaufman%40bcmone.com%7C2512b4a26acc44d8b3a408d9db5ecaf8%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637782022465024397%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=uMbNUPXj2O0Z50s7JyzRldgsdjLliktD5%2FSmL32SLTw%3D&amp;reserved=0).

Here is what I ended up with:
xlog("L_INFO", "### Something to log ### Line: $cfg(line)\n");

Maybe someone else knows more, but I could not get it to work without 
hardcoding it into every xlog call.

--
^C


On 1/19/22 7:06 AM, marek wrote:
> hi,
> 
> is it possible create log of SIP dialog like 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.asterisk.org%2Fwiki%2Fdisplay%2FAST%2FUnique%2BCall-ID%2BLogging&amp;data=04%7C01%7Cbkaufman%40bcmone.com%7C2512b4a26acc44d8b3a408d9db5ecaf8%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637782022465024397%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=9O6Y47QgTBJJdRL9NOUsAaIdNz3peQzoZes8E6%2BHZpE%3D&amp;reserved=0
>  ?
> 
> it looks like its possible like this
> 
>   xlog("L_INFO", "D$dlg(h_id)   something to log \n");
> 
> but i must copy $dlg(h_id) in every xlog
> 
> tried this
> 
> modparam("xlog", "prefix", "D$dlg(h_id)")
> 
> but it not works with variables
> 
> any other tips/ideas?
> 
> goal is to correlate logs for one dialog (call)
> 
> 
> thanks
> 
> Marek
> 
> 
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&amp;data=04%7
> C01%7Cbkaufman%40bcmone.com%7C2512b4a26acc44d8b3a408d9db5ecaf8%7Cafc18
> 18e7b6848568913201b9396c4fc%7C1%7C0%7C637782022465024397%7CUnknown%7CT
> WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> 6Mn0%3D%7C3000&amp;sdata=vKjIzrpD7meLnncocL81A%2FxYSV1g26HiTjZLjiNHejQ
> %3D&amp;reserved=0

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * 
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&amp;data=04%7C01%7Cbkaufman%40bcmone.com%7C2512b4a26acc44d8b3a408d9db5ecaf8%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637782022465024397%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=vKjIzrpD7meLnncocL81A%2FxYSV1g26HiTjZLjiNHejQ%3D&amp;reserved=0

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to