[asterisk-dev] [Code Review] 2830: res_pjsip: Forward PJSIP logging to Asterisk logging

Joshua Colp reviewboard at asterisk.org
Thu Sep 12 09:59:21 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2830/#review9671
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Colp


On Sept. 6, 2013, 8:05 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2830/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2013, 8:05 p.m.)
> 
> 
> Review request for Asterisk Developers, Joshua Colp and Mark Michelson.
> 
> 
> Bugs: ASTERISK-22360
>     https://issues.asterisk.org/jira/browse/ASTERISK-22360
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch uses PJSIP's pj_log_set_log_func() to forward PJSIP's log
> messages to Asterisk's logger. This is done in a new module:
> res_pjsip_log_forwarder.so.
> 
> This patch sets defaultenabled on the existing res_pjsip_logger.so to
> no, since logging every SIP packet seems a bit odd to do by default, and
> is (hopefully) less necessary with regular PJSIP logging.
> 
> It also removes res_rtp_asterisk's disabling of PJSIP logging.
> 
> From the \file comment:
> 
>  * PJSIP logging doesn't exactly match Asterisk logging, but mapping the two is
>  * not too bad. PJSIP log levels are identified by a single int. Limits are
>  * not specified by PJSIP, but their implementation used 1 through 6.
>  *
>  * The mapping is as follows:
>  *  - 0: LOG_ERROR
>  *  - 1: LOG_ERROR
>  *  - 2: LOG_WARNING
>  *  - 3 and above: equivalent to ast_debug(level, ...) for res_pjsip.so
> 
> 
> Diffs
> -----
> 
>   /branches/12/res/res_rtp_asterisk.c 398565 
>   /branches/12/res/res_pjsip_logger.c 398565 
>   /branches/12/res/res_pjsip_log_forwarder.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2830/diff/
> 
> 
> Testing
> -------
> 
> Configured res_pjsip, set the debug level, started up a phone, watched
> the logs roll in.
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130912/06eff2c5/attachment.htm>


More information about the asterisk-dev mailing list