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

Kevin Harwell reviewboard at asterisk.org
Tue Aug 27 16:27:28 CDT 2013



> On Aug. 27, 2013, 4:33 p.m., Tilghman Lesher wrote:
> > branches/11/main/logger.c, lines 1545-1547
> > <https://reviewboard.asterisk.org/r/2798/diff/1/?file=45214#file45214line1545>
> >
> >     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.

The addition of this code essentially turns ast_log(LOG_VERBOSE, ...) into the same thing as ast_verb(0, ...).  Where as before using the former version would not prefix the verbose message (i.e. no associated verbose level, no optional time stamp, etc...), thus it was possible for it to be printed differently on a remote vs. local console.  I think leaving it in does safeguard any possible problems with it if someone does use that version instead of ast_verb(0, ...).  In the meantime the ones that currently exist can be converted.


- Kevin


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


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/97909e27/attachment.htm>


More information about the asterisk-dev mailing list