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.com
www.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/