[asterisk-app-dev] ARI method of posting log messages to Asterisk

Paul Belanger paul.belanger at polybeacon.com
Wed Oct 16 14:33:28 CDT 2013


On Wed, Oct 16, 2013 at 3:22 PM, Matthew Jordan <mjordan at digium.com> wrote:
>
> On Wed, Oct 16, 2013 at 2:10 PM, Brad Watkins <bwatkins at thinkingphones.com>
> wrote:
>>
>>
>> I don't personally see a need for logging functionality within ARI.
>> There are so many ways in any language you can think of to log to
>> files/database/etc. that complicating the ARI in order to pollute
>> asterisk's logs more seems unnecessary.
>>
>> - Brad
>>
>
> Actually, a few people (/me looks at Alistair and Lenz) at AstriDevCon
> expressed an interest in this functionality. The idea is that an Asterisk
> application - whether or not that's a dialplan application or an application
> that is written and controlled via ARI - still interacts with Asterisk.
> There may be times when you want log messages from that application to also
> emit log messages in Asterisk, so that the context of what happens to a call
> is still in the same log file with the rest of the Asterisk messages.
>
> Say for example your application hits an error condition and hangs up the
> channel - from the Asterisk log file perspective, it just got a DELETE
> channel and it hangs up the channel. It doesn't know why it hung it up - for
> all it knows, the hangup was completely nominal. Having the ability to send
> a:
>
> [Oct 16 17:20:23] ERROR[20023] my_first_queue.py:1234: Oh snap! There aren't
> any agents! Bail - bail - bail
>
> Tells you why the caller just got hung up from the Asterisk log without
> having to look at your ARI application log file. At the very least, it
> correlates when the activity happens from Asterisk's perspective, giving you
> a starting point in your application log file as well.
>
But isn't this the exact reason we have syslog support within
Asterisk? IMO there is no need to interface into asterisk to have
asterisk generate the logging, simple pipe into syslog and have it
deal with it.  Additionally, if you don't want to use syslog there are
other projects like logstash[1] that come to mind for dealing with
multiple sources of logging.

Seem like there are a handful of ways to already achieve this without
adding more stuff into asterisk.

[1] http://logstash.net/

-- 
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger



More information about the asterisk-app-dev mailing list