[Freeswitch-users] Re- UUID logging to freeswitch log file missing for Lua freeswitch.consoleLog() logging

Avi Marcus avi at avimarcus.net
Fri Dec 11 07:17:33 MSK 2015


I had a very similar question and I documented it here:

https://freeswitch.org/confluence/display/FREESWITCH/mod_lua#mod_lua-Whereismydebuginformation?
Q: When I use static XML or xml_curl, I see the commands executed in the
fs_cli and in the "application log" section of the xml_cdr file. However,
when I run commands via my lua script, I don't see that information
anywhere?

A: When you have an actual call session, you can use
session:execute("$application","$data") just like in the static XML - it
will then show up in the fs_cli and the xml_cdr application log. If you
don't have a call session - e.g. if you are running lua as a background
application or from the CLI, then you have to use other commands which may
not be as easily logged.

-Avi Marcus
BestFone

On Fri, Dec 11, 2015 at 3:48 AM, Andrew Keil <andrew.keil at visytel.com>
wrote:

> To FreeSWITCH users,
>
>
>
> Re- FreeSWITCH version 1.6.5
>
>
>
> I just noticed that inside the /log/freeswitch.log file (and also down the
> Event Socket Layer side) that the uuid is not logged when calls to
> freeswitch.consoleLog(…) are made from inside a Lua script.
>
>
>
> For example:
>
>
>
> freeswitch.consoleLog("INFO", "Test message\n") logs inside
> /log/freeswitch.log:
>
>
>
> 2015-12-11 12:27:57.960004 [INFO] switch_cpp.cpp:1356 Test message
>
>
>
> whereas other logging automatically prefixes with the session uuid (for
> example):
>
>
>
> f014f888-44e5-4edc-98e9-420ab2fe3698 2015-12-11 12:14:06.326636 [NOTICE]
> switch_cpp.cpp:683 Channel [sofia/internal/1000 at 192.168.15.50] has been
> answered
>
>
>
> Also when looking into the ESL side I noticed that the same is true for
> ESL events (Content-Type:log/data) where the “User-Data” header is empty
> for the freeswitch.consoleLog logging calls, however contains the session
> uuid for other log messages.
>
>
>
> My question is whether there is a simple switch inside a configuration
> file to enable uuid logging from Lua scripts (especially for the
> freeswitch.consoleLog(…) function calls)?
>
>
>
> I understand that I could simply add the uuid inside the log message
> string myself for all freeswitch.consoleLog(…) function calls, however I
> would have thought that internally (since the uuid is available to the Lua
> script via session:getVariable("uuid")) that the uuid could be logged like
> it is in other parts of FreeSWITCH already.
>
>
>
> Regards,
>
>
>
> Andrew Keil
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151211/909ffa1d/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list