[asterisk-dev] [Code Review] Add ability for modules to dynamically register/unregister logger levels

Mark Michelson mmichelson at digium.com
Tue May 5 09:46:44 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/244/#review766
-----------------------------------------------------------



/trunk/main/logger.c
<http://reviewboard.digium.com/r/244/#comment1928>

    These comments should be doxygenified.



/trunk/main/logger.c
<http://reviewboard.digium.com/r/244/#comment1929>

    This is a bit inefficient since the loop will continue past the point that you find the first available dynamic level. You should break instead of continuing.



/trunk/main/logger.c
<http://reviewboard.digium.com/r/244/#comment1930>

    I think you should make a copy of the name here since the parameter passed to this function may go out of scope while the log level is still registered. Of course, this would mean that a corresponding free should be added to the unregister function.



/trunk/tests/test_logger.c
<http://reviewboard.digium.com/r/244/#comment1932>

    ew


- Mark


On 2009-05-05 09:20:44, Kevin Fleming wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/244/
> -----------------------------------------------------------
> 
> (Updated 2009-05-05 09:20:44)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch adds the ability for modules to dynamically create logger levels for their own use; these are named levels just like the built-in levels, and can be directed to any destination that the logger can send any level to, by including their names in logger.conf.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/logger.h 192370 
>   /trunk/main/logger.c 192370 
>   /trunk/tests/test_logger.c PRE-CREATION 
> 
> Diff: http://reviewboard.digium.com/r/244/diff
> 
> 
> Testing
> -------
> 
> Tested using included test_logger module.
> 
> 
> Thanks,
> 
> Kevin
> 
>




More information about the asterisk-dev mailing list