[OpenSIPS-Users] user script trace option in xlog?

Kingsley Tart kingsley at dns99.co.uk
Mon Oct 25 17:50:34 EST 2021


Hi,

Is there something that I can put in an xlog() call that will show the
trace of calling lines, a bit like "cluck" in Perl's Carp module?

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

where line 2623 is the line with the xlog() call, line 1874 is the line
that called the function that made the xlog() call, and line 723 is the
line that called the function that line 1874 is in.

Cheers,
Kingsley.




More information about the Users mailing list