<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><tt>I understand what's happening now.
        The thing is, if you use xlog() with only 1 parameter in your
        script, that message will simply go to syslog's LOG_ERR (it
        should be visible!).<br>
        <br>
        You can control the logging level within your script with
        xlog("L_NOTICE", ".....") or xlog("L_DBG", "...") for example.<br>
        <br>
        Best regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 08/06/2014 08:29 PM, Oleksandr Kunytsia wrote:<br>
    </div>
    <blockquote
cite="mid:CAAYNYir0vL14+GB9pa_Fg8VYv8Atfs967iDobPTV=i377PK83w@mail.gmail.com"
      type="cite">
      <div dir="ltr">on my config debug set to 0:
        <div>----</div>
        <div>
          <div><br>
          </div>
          <div>#</div>
          <div># GLOBALS</div>
          <div>#</div>
          <div>debug=0</div>
          <div>log_facility=LOG_LOCAL2</div>
          <div>log_stderror=no</div>
        </div>
        <div>------</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I also configured rsyslog for saving LOCAL2 to file with
          specific template:</div>
        <div>----</div>
        <div>
          <div>$template precise,"%pri-text%: %timegenerated% %HOSTNAME%
            %syslogtag%%msg%\n" &nbsp;</div>
          <div>local2.* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -/var/log/sips.log;precise
            &nbsp;</div>
          <div>----<br>
          </div>
        </div>
        <div><br>
        </div>
        <div>extract from &nbsp;/var/log/sips.log:<br>
        </div>
        <div>
          <div><br>
          </div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5588]: new-int INVITE[PhoneNUM,PhoneNUM57]: SIP 404
            after 19161ms from IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5612]: r-lt1 INVITE[+1PhoneNUM,PhoneNUM1]: SIP 180
            after 25905ms from IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5592]: r-lt1 INVITE[+1PhoneNUM,PhoneNUM5]: relayed
            IP.ADD.RE.SS outbound to IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5600]: r-in1 INVITE[+1PhoneNUM,PhoneNUM7]: relayed
            IP.ADD.RE.SS outbound to IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5588]: new-int INVITE[PhoneNUM7,PhoneNUM]: relayed
            IP.ADD.RE.SS outbound to IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5560]: r-in1 INVITE[+PhoneNUM,PhoneNUM437]: SIP 100
            after 3ms from IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5650]: r-lt1 INVITE[800PhoneNUM,PhoneNUM248]:
            relayed IP.ADD.RE.SS outbound to IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5622]: r-lt1 INVITE[+PhoneNUM,PhoneNUM015]: SIP 100
            after 9ms from IP.ADD.RE.SS</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5624]: Broadvox BYE[PhoneNUM,PhoneNUM00] existing
            dialog</div>
          <div>local2.err&lt;147&gt;: Aug &nbsp;6 17:18:52 r-sip
            opensips[5604]: r-in1 INVITE[80PhoneNUM,PhoneNUM213]: SIP
            183 after 7270ms from IP.ADD.RE.SS</div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Wed, Aug 6, 2014 at 11:17 AM,
          Muhammad Shahzad <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:shaheryarkh@gmail.com"
              target="_blank">shaheryarkh@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>
                <div>
                  <div>You can set opensips log level using "debug"
                    parameter.<br>
                    <br>
                    <a moz-do-not-send="true"
href="http://www.opensips.org/Documentation/Script-CoreParameters-1-11#toc35"
                      target="_blank">http://www.opensips.org/Documentation/Script-CoreParameters-1-11#toc35</a><br>
                    <br>
                  </div>
                  Also make sure your syslog service is configured to
                  send local2.* logs to the log file(s) where you want
                  to see them. i.e. to see all opensips logs file named
                  opensips.log set /etc/rsyslog.conf to have entry like
                  this,<br>
                  <br>
                </div>
                local2.*&nbsp; /var/log/opensips.log<br>
                <br>
              </div>
              <div>Then restart the service.<br>
              </div>
              <div><br>
              </div>
              Hope this helps.<br>
              <div>
                <div>
                  <div><br>
                  </div>
                  <div>Thank you.<br>
                    <br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
            <div class="gmail_extra">
              <br>
              <br>
              <div class="gmail_quote">
                <div>
                  <div class="h5">On Wed, Aug 6, 2014 at 10:49 AM,
                    Oleksandr Kunytsia <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:okunia@gmail.com" target="_blank">okunia@gmail.com</a>&gt;</span>
                    wrote:<br>
                  </div>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div class="h5">
                      <div dir="ltr"><span
                          style="font-family:arial,sans-serif;font-size:13px">Hello,</span>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px"><br>
                        </div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">Logging
                          of my opensips looks like the following:</div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">
                          <div><br>
                          </div>
                          <div>----cut----&nbsp;</div>
                          <div>log_facility=LOG_LOCAL2</div>
                          <div>log_stderror=no</div>
                        </div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">----cut----<br>
                        </div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px"><br>
                        </div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">Opensips
                          sends logging information as LOCAL2.error
                          messages,</div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">
                          <br>
                        </div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">How
                          to configure to send messages with another
                          log_level? e.g.&nbsp;<a moz-do-not-send="true"
                            href="http://local2.info/" target="_blank">local2.info</a>?</div>
                        <div
                          style="font-family:arial,sans-serif;font-size:13px">
                        </div>
                      </div>
                      <br>
                    </div>
                  </div>
                  <div class="">_______________________________________________<br>
                    Users mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:Users@lists.opensips.org"
                      target="_blank">Users@lists.opensips.org</a><br>
                    <a moz-do-not-send="true"
                      href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                      target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                    <br>
                  </div>
                </blockquote>
              </div>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>