[asterisk-dev] [Code Review] 2798: Verbose logging discrepancies

Tilghman Lesher reviewboard at asterisk.org
Tue Aug 27 11:33:52 CDT 2013


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



branches/11/main/asterisk.c
<https://reviewboard.asterisk.org/r/2798/#comment18644>

    We do have a smattering of ast_verb(6, ...) in the codebase (which would be -7).  Should we detect all possible values, perhaps?
    
    Also, given that this code is executed everytime the verboser is called, shouldn't this be a const string, instead of an sprintf()?



branches/11/main/asterisk.c
<https://reviewboard.asterisk.org/r/2798/#comment18643>

    This isn't the same thing.  The former code only prints if the verboser is off, and it's changed to only print if the verboser is on.



branches/11/main/logger.c
<https://reviewboard.asterisk.org/r/2798/#comment18642>

    Essentially what you're doing here is that if the log level is VERBOSE, you're feeding it to a function that removes the prefix, but pretty much everywhere it's called, there's no prefix at all.  I'm wondering if perhaps those instances should be converted to ast_verb() with a level of 0, and then this code shouldn't be necessary.


- Tilghman Lesher


On Aug. 27, 2013, 3:49 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2798/
> -----------------------------------------------------------
> 
> (Updated Aug. 27, 2013, 3:49 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: AST-1193
>     https://issues.asterisk.org/jira/browse/AST-1193
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Refactored cases where a combination of ast_verbose/options_verbose were present.  Also in general tried to eliminate, in as many places as possible, where the options_verbose global variable was being used.  Refactored the way local and remote consoles handle verbose message logging in an attempt to solve the various discrepancies that sometimes would show between the two.
> 
> 
> Diffs
> -----
> 
>   branches/11/apps/app_dumpchan.c 397483 
>   branches/11/apps/app_verbose.c 397483 
>   branches/11/main/asterisk.c 397483 
>   branches/11/main/logger.c 397483 
> 
> Diff: https://reviewboard.asterisk.org/r/2798/diff/
> 
> 
> Testing
> -------
> 
> Tested several logging scenarios with various combinations of levels, messages, and consoles.  Also made sure the app_verbose and dumpchan were still working as expected after the changes.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

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


More information about the asterisk-dev mailing list