Hi Kingsley, You could use cfg_line
to return your linenumber in the script via xlog. Kingsley Tart <[email protected]> schrieb am Mo., 25. Okt. 2021, 19:52: > 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. > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
