<p>Then it would make more sense to have a global param to set the common template format for all xlog messages, something like</p>

<pre><code>xlog_format = "[%L_LEVEL - %ROUTE_TYPE(%ROUTE_NAME) Line:%LINE_NO] %MSG"

xlog("L_ERR", "Failed to route to PSTN attempt($avp(relay_count))\n");
</code></pre>

<p>resulting in a syslog message like</p>

<pre><code>Jul  7 05:49:52 hostname opensips[31929]: [ERR - failure_route(HANDLE_FAILURE) Line:954] Failed to route to PSTN attempt(3)
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/568#issuecomment-119267872">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciTlIE0RLUm0GM17D9UzUuYc87WGdks5oa_0JgaJpZM4FTDWH.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/568#issuecomment-119267872"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>