[SR-Users] Setting the prefix in Json formatted logs

Abdirahman Osman abdirahman.osm at gmail.com
Thu May 27 22:08:31 CEST 2021


Thanks Daniel,

Is there a way to add additional custom fields? like the value of a
custom global variable.?

Abdirahman

On Thu, 27 May 2021 at 14:15, Daniel-Constantin Mierla <miconda at gmail.com>
wrote:

> Hello,
> On 27.05.21 18:37, Abdirahman Osman wrote:
>
> Hello everyone,
>
> Tried to use the log-engine to push json formatted logs, here is a what
> kamailio is sending, my question is, How can I set the kamailio prefix?
>
> (232) { "kamailio.level": "DEBUG", "kamailio.module": "tm",
> "kamailio.file": "timer.c", "kamailio.line": 634, "kamailio.function":
> "wait_handler", "kamailio.callid": "", "kamailio.logprefix": "", "message":
> "finished transaction: 0x7f232236b1c0 (p:0x7f232216ae58/n:0x7f232216ae58)" }
>
> set log_prefix global parameter, like:
>
>   * https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L174
>
> But note that it is actually set only when processing SIP traffic. The log
> you pasted above is from a timer routine, not from a sip handling function.
> So in such case the log prefix is going to be empty always.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Online - June 7-10, 2021 (America Timezone)
>   * https://www.asipto.com/sw/kamailio-advanced-training-online/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210527/effe9cfc/attachment.htm>


More information about the sr-users mailing list