Currently FreeSWITCH logs to files on disk and you can customize the behavior a bit using logfile.conf.xml. I am working on a project where I need to direct FreeSWITCH to write logs to a socket (like a TCP client). I have written a TCP Server listening for logs on a particular socket. I thought I will change the source code of freeswitch/src/switch_log.c and will add TCP client code to it, then recomplile it. Is there any better way ?
ESL? subscribe to events, or use zeromq or some other way of getting them, then log them however you want? -Avi On Tue, Dec 13, 2011 at 3:40 PM, <arnuld@phonologies.com> wrote:
Currently FreeSWITCH logs to files on disk and you can customize the behavior a bit using logfile.conf.xml.
I am working on a project where I need to direct FreeSWITCH to write logs to a socket (like a TCP client). I have written a TCP Server listening for logs on a particular socket. I thought I will change the source code of freeswitch/src/switch_log.c and will add TCP client code to it, then recomplile it.
Is there any better way ?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Tue, Dec 13, 2011 at 9:40 PM, Avi Marcus <avi@avimarcus.net> wrote:
ESL? subscribe to events, or use zeromq or some other way of getting them, then log them however you want?
Im not sure if ESL will give you the output (as detailed) like the FS Logging does. So even if youre going go subscribe to events, its not really logs, but only events. Just like you see log statements being printed in the console, isnt there a way to divert that to a socket? Prashant Phonologies (India)
ESL? subscribe to events, or use zeromq or some other way of getting them, then log them however you want?
I see I can use command "log debug/info/etc." through telnet (connected using ESL). I can get useful logs. Only trouble is I have 10 calls in progress and there is no way of knowing which log belongs to which call: In logfile.conf.xml you can use <param name="uuid" value="true" /> and it will print uuid of each call as first thing before every text line being send to log file. Is there some kind of similar identification I can use in logs coming through ESL ? -- Arnuld Uttre Systems Software Engineer arnuld@Phonologies.COM http://www.phonologies.com Phonologies (India) Private Limited West Wing, Marri Deep, M. C. H. No. 12-5-4, Lallaguda, Secunderabad 500017, INDIA. Ph:+91-40-2701 8993 / 36 Fax:+91-40-2701 8992
On Wed, Dec 14, 2011 at 2:50 AM, Arnuld Uttre (Phonologies) < arnuld@phonologies.com> wrote:
ESL? subscribe to events, or use zeromq or some other way of getting them, then log them however you want?
I see I can use command "log debug/info/etc." through telnet (connected using ESL). I can get useful logs. Only trouble is I have 10 calls in progress and there is no way of knowing which log belongs to which call:
In logfile.conf.xml you can use <param name="uuid" value="true" /> and it will print uuid of each call as first thing before every text line being send to log file. Is there some kind of similar identification I can use in logs coming through ESL ?
No, there is not. If you absolutely must have the uuid on the log lines then your best bet is to write your own logger in the vein of mod_syslog. You can find out how Mathieu added uuid logging to mod_logfile.c by searching for "log_uuid" - there's not too much to it. -MC
Can't syslog do that? See: http://wiki.freeswitch.org/wiki/Mod_syslog François. On Tue, 2011-12-13 at 19:10 +0530, arnuld@Phonologies.com wrote:
Currently FreeSWITCH logs to files on disk and you can customize the behavior a bit using logfile.conf.xml.
I am working on a project where I need to direct FreeSWITCH to write logs to a socket (like a TCP client). I have written a TCP Server listening for logs on a particular socket. I thought I will change the source code of freeswitch/src/switch_log.c and will add TCP client code to it, then recomplile it.
Is there any better way ?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Can't syslog do that?
Unfortunately, there is nothing to see there. I thought I will write there something useful but even google search is unable to provide any useful information on what exactly FreeSWITCH module syslogs does. -- Arnuld Uttre Systems Software Engineer arnuld@Phonologies.COM http://www.phonologies.com Phonologies (India) Private Limited West Wing, Marri Deep, M. C. H. No. 12-5-4, Lallaguda, Secunderabad 500017, INDIA. Ph:+91-40-2701 8993 / 36 Fax:+91-40-2701 8992
On Wed, 2011-12-14 at 16:16 +0530, Arnuld Uttre (Phonologies) wrote:
Can't syslog do that?
Unfortunately, there is nothing to see there. I thought I will write there something useful but even google search is unable to provide any useful information on what exactly FreeSWITCH module syslogs does.
Here are links to the <200 lines source code and its config file: http://fisheye.freeswitch.org/browse/freeswitch.git/src/mod/loggers/mod_sysl... http://fisheye.freeswitch.org/browse/freeswitch.git/conf/autoload_configs/sy... Then you just setup your syslog for remote logging: http://www.deer-run.com/~hal/sysadmin/SSH-SyslogNG.html François.
Unfortunately not everyone can read C :p On Wed, Dec 14, 2011 at 4:35 AM, François Delawarde <fdelawarde@wirelessmundi.com> wrote:
On Wed, 2011-12-14 at 16:16 +0530, Arnuld Uttre (Phonologies) wrote:
Can't syslog do that?
Unfortunately, there is nothing to see there. I thought I will write there something useful but even google search is unable to provide any useful information on what exactly FreeSWITCH module syslogs does.
Here are links to the <200 lines source code and its config file:
http://fisheye.freeswitch.org/browse/freeswitch.git/src/mod/loggers/mod_sysl...
http://fisheye.freeswitch.org/browse/freeswitch.git/conf/autoload_configs/sy...
Then you just setup your syslog for remote logging: http://www.deer-run.com/~hal/sysadmin/SSH-SyslogNG.html
François.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
If you plan to do mods in freeswitch/src/switch_log.c, write your own FS module or do some ESL code, you probably can! ;-) On Wed, 2011-12-14 at 07:09 -0800, curriegrad2004 wrote:
Unfortunately not everyone can read C :p
On Wed, Dec 14, 2011 at 4:35 AM, François Delawarde <fdelawarde@wirelessmundi.com> wrote:
On Wed, 2011-12-14 at 16:16 +0530, Arnuld Uttre (Phonologies) wrote:
Can't syslog do that?
Unfortunately, there is nothing to see there. I thought I will write there something useful but even google search is unable to provide any useful information on what exactly FreeSWITCH module syslogs does.
Here are links to the <200 lines source code and its config file:
http://fisheye.freeswitch.org/browse/freeswitch.git/src/mod/loggers/mod_sysl...
http://fisheye.freeswitch.org/browse/freeswitch.git/conf/autoload_configs/sy...
Then you just setup your syslog for remote logging: http://www.deer-run.com/~hal/sysadmin/SSH-SyslogNG.html
François.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (7)
-
Arnuld Uttre (Phonologies)
-
arnuld@Phonologies.com
-
Avi Marcus
-
curriegrad2004
-
François Delawarde
-
Michael Collins
-
Prashant Lamba