[Freeswitch-users] Logging commands

Oleg Stolyar olegstolyar at gmail.com
Wed Oct 1 16:54:31 MSD 2014


Guys,

could someone take a look at this pull request?  I understand that it's not
the highest priority but it's very small.
https://stash.freeswitch.org/projects/FS/repos/freeswitch/pull-requests/56/overview

On Sun, Sep 14, 2014 at 9:18 AM, Oleg Stolyar <olegstolyar at gmail.com> wrote:

> Pull request created.  Thanks Michael, Steven, Dušan!
>
> On Sun, Sep 14, 2014 at 8:46 AM, Oleg Stolyar <olegstolyar at gmail.com>
> wrote:
>
>> Thanks Dušan!
>>
>> Jira account I already have.  Will start the process.
>>
>> On Sun, Sep 14, 2014 at 7:45 AM, Dušan Dragić <dragic.dusan at gmail.com>
>> wrote:
>>
>>> There is a nice guide (with pictures!) at
>>> https://confluence.freeswitch.org/display/FREESWITCH/Pull+Requests
>>> Just one thing, there's no need to clone your forked repo if you
>>> already have a copy of main freeswitch repo.
>>> Add it as a new remote (git remote add ...), push to it and then
>>> continue with creating the pull request etc.
>>>
>>> On 14 September 2014 16:15, Oleg Stolyar <olegstolyar at gmail.com> wrote:
>>> > I've made the changes (using regex) but I believe I need a login to
>>> commit
>>> > to a branch before make a pull request on stash.freeswitch.org.
>>> >
>>> > Can I get that or can I send my changes to someone to quickly review
>>> and
>>> > commit them?  It's just two files - mod_xml_rpc.c and xml_rpc.conf.xml
>>> in
>>> > the vanilla conf where I added a commented out example and a comment
>>> > explaning what it does.
>>> >
>>> > On Fri, Sep 12, 2014 at 5:27 PM, Oleg Stolyar <olegstolyar at gmail.com>
>>> wrote:
>>> >>
>>> >> Those are excellent ideas Steven, thanks!
>>> >>
>>> >> I am thinking of implementing the configurability by adding the
>>> strings or
>>> >> regex patterns to the config file.  Only commands that contain those
>>> >> patterns will be logged.  It's been a looooong time since I worked
>>> with C,
>>> >> so this may take me a bit of time.
>>> >>
>>> >> One question that'll need to be decided - should I allow regex
>>> patterns in
>>> >> the config file or just a list of strings that will be compared to the
>>> >> command + api_str using simple stristr.  What do you think?
>>> >>
>>> >> On Fri, Sep 12, 2014 at 4:39 PM, Steven Ayre <steveayre at gmail.com>
>>> wrote:
>>> >>>
>>> >>> You can submit it as a pull request on stash.freeswitch.org
>>> >>>
>>> >>> I'd suggest though that a) you make it debug not info and b) make it
>>> >>> configurable (at least so you can enable it, disabled by default -
>>> you could
>>> >>> also allow the user to configure the logging level. In some use
>>> cases a busy
>>> >>> server it could result in a lot of logging which may be undesirable.
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> On 13 September 2014 00:12, Oleg Stolyar <olegstolyar at gmail.com>
>>> wrote:
>>> >>>>
>>> >>>> Thanks Michael!
>>> >>>>
>>> >>>> I added this as line 1057 in mod_xml_rpc.c
>>> >>>>
>>> >>>> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Executed
>>> HTTP
>>> >>>> request command: %s. Args: %s.\n", command, api_str);
>>> >>>>
>>> >>>> Could someone review it and check it into the repo?
>>> >>>>
>>> >>>>
>>> >>>> On Fri, Sep 12, 2014 at 1:33 PM, Michael Jerris <mike at jerris.com>
>>> wrote:
>>> >>>>>
>>> >>>>> I suspect it requires a 1 line code change to the mod_xml_rpc.c to
>>> log
>>> >>>>> before executing.  It would be somewhere right around
>>> mod_xml_rpc.c line
>>> >>>>> 1056 (which is the line that actually executes the command).
>>> >>>>>
>>> >>>>>
>>> >>>>> On Sep 11, 2014, at 7:21 PM, Oleg Stolyar <olegstolyar at gmail.com>
>>> >>>>> wrote:
>>> >>>>>
>>> >>>>> > Guys,
>>> >>>>> >
>>> >>>>> > is there a way to log cli commands that are being executed?  More
>>> >>>>> > specifically I use the txtapi command from the xml_rpc module
>>> and need to be
>>> >>>>> > able to see when FreeSWITCH received and executed each command
>>> with
>>> >>>>> > argument.  Is it doable already or would it require a code
>>> change?
>>> >>>>> >
>>> >>>>> > I already have this in my logfile.conf.xml
>>> >>>>> > <map name="all"
>>> value="debug,info,notice,warning,err,crit,alert"/>
>>> >>>>> >
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> _________________________________________________________________________
>>> >>>>> 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
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>
>>> _________________________________________________________________________
>>> >>>> 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
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> _________________________________________________________________________
>>> >>> 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
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> _________________________________________________________________________
>>> > 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
>>>
>>>
>>>
>>> --
>>> Dušan Dragić
>>>
>>> _________________________________________________________________________
>>> 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/20141001/c837e107/attachment-0001.html 


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