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

Steven Ayre steveayre at gmail.com
Fri Dec 11 16:24:52 MSK 2015


freeswitch.consoleLog is for generic log messages not linked to a session,
it does not have a UUID. From Lua you're more likely to use it from
something like a startup script than a script invoked from the dialplan.

Use session:consoleLog when logging against a session to log with its UUID.

On 11 December 2015 at 01:48, 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/8cdb52ae/attachment.html 


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