<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,<br>
    </p>
    <div class="moz-cite-prefix">On 27.05.21 18:37, Abdirahman Osman
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEjtZA21jq-k_gg1TqwUEjevxtob70To=jW5QSo8nMg=QVAQog@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello everyone,
        <div><br>
        </div>
        <div>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?</div>
        <div><br>
        </div>
        <div>
          <p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(127,0,0);background-color:rgb(251,237,237)">(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)" }</span></p>
        </div>
      </div>
    </blockquote>
    <p>set log_prefix global parameter, like:</p>
    <p>  *
      <a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L174">https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L174</a></p>
    <p>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.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online - June 7-10, 2021 (America Timezone)
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>