[OpenSIPS-Users] user script trace option in xlog?
Liviu Chircu
liviu at opensips.org
Tue Oct 26 16:25:54 EST 2021
On 25.10.2021 20:50, Kingsley Tart wrote:
> eg if I want to xlog an error, it would be handy for debugging purposes
> to do something like
>
> xlog("L_WARN", "You did a silly thing", 1);
>
> and in the logs, see something like
>
> You did a silly thing
> at opensips.cfg line 2623
> at opensips.cfg line 1874
> at opensips.cfg line 723
Hi,
Sounds to me like you need a route invocation backtrace, which is
immediately available via the $(route[*]) construct. See the docs [1]
for more details.
Disclaimer: no line numbers are provided, only the list of route names
that led up to the current execution point.
[1]: https://www.opensips.org/Documentation/Script-CoreVar-3-3#toc96
Best,
--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS eBootcamp 2021: www.opensips.org/training
More information about the Users
mailing list