[asterisk-dev] [Code Review]: Logger does not warn of failure to open logging channels

David Vossel reviewboard at asterisk.org
Wed Aug 10 16:56:23 CDT 2011



> On Aug. 2, 2011, 1:04 p.m., David Vossel wrote:
> > trunk/main/logger.c, lines 276-278
> > <https://reviewboard.asterisk.org/r/1338/diff/1/?file=17693#file17693line276>
> >
> >     Why not use the ast_console_puts_mutable() function here to log this error as well?
> 
> opticron wrote:
>     This case is caught by the added logging now that the failed logging channel is freed and null is returned.  This also allows that error message to handle other logging failures that were not previously reported.

Keep the catch all statement, I was just saying it might be good to have this one in addition to the catch all since it gives more detailed information pertaining to the failure.


- David


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


On Aug. 8, 2011, 4:10 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1338/
> -----------------------------------------------------------
> 
> (Updated Aug. 8, 2011, 4:10 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Currently, logger only prints an error message to stderr when it fails to open a logger channel where many users will not see it because the logger lock is held.  The alternative provided by this patch is to log the error to all attached consoles in the hopes that it will be easier to see.  Additionally, this patch prevents the failed logger channel from being added to the list where it would silently fail on each call to the Asterisk logger.
> 
> 
> This addresses bug ASTERISK-16231.
>     https://issues.asterisk.org/jira/browse/ASTERISK-16231
> 
> 
> Diffs
> -----
> 
>   trunk/main/logger.c 331040 
> 
> Diff: https://reviewboard.asterisk.org/r/1338/diff
> 
> 
> Testing
> -------
> 
> Verified that the stderr log was the only thing printed for failed logger channels.  Verified that the patch provides warning to indirect consoles (not using the -c option).
> 
> 
> Thanks,
> 
> opticron
> 
>

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


More information about the asterisk-dev mailing list