[asterisk-dev] [Code Review] 2825: Remote console: more output discrepancies

Kevin Harwell reviewboard at asterisk.org
Fri Sep 6 11:12:35 CDT 2013



> On Sept. 5, 2013, 5:08 a.m., Tilghman Lesher wrote:
> > It's not clear why adding a magic value for cli output is the answer here.

There must be a way to tell if incoming text on a remote console are log messages vs. cli output. 

Say for instance the log level was 3 on the remote console and a few lines of log messages had been sent to it.  At this point the last known log level was 3.  Now a cli output message is sent to the remote console and since it has no "magic" the last known log level was assumed and it would print the cli output using the verbose level 3 prefix.

By adding a "magic" value to the cli output going to a remote console it can now tell the difference between incoming log messages and cli output and print them appropriately.


> On Sept. 5, 2013, 5:08 a.m., Tilghman Lesher wrote:
> > branches/11/main/asterisk.c, line 1944
> > <https://reviewboard.asterisk.org/r/2825/diff/1/?file=45641#file45641line1944>
> >
> >     I don't see where you're using this define.

line 1963 in asterisk.c just a few lines below the define.


> On Sept. 5, 2013, 5:08 a.m., Tilghman Lesher wrote:
> > branches/11/main/asterisk.c, lines 1963-1977
> > <https://reviewboard.asterisk.org/r/2825/diff/1/?file=45641#file45641line1963>
> >
> >     So level will be 127, when you're outputting via the cli (non-verbose), correct?  Is that really what you intended?

When outputting via the cli the level will be 0, thus no prefix is added.  It does a check to see if the level is less than the VERBOSE_MAX_LEVEL.  If it is then it's a logging type otherwise assume cli.  If it's a logging type then use the level given otherwise set the level to zero.


- Kevin


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


On Sept. 4, 2013, 10:29 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2825/
> -----------------------------------------------------------
> 
> (Updated Sept. 4, 2013, 10:29 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-22450
>     https://issues.asterisk.org/jira/browse/ASTERISK-22450
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This is a follow up to https://reviewboard.asterisk.org/r/2798/
> 
> The remote console continued to have issues with its output.  In this case CLI command output would either not show up (if verbose level = 0) or would contain verbose prefixes (if verbose level > 0) once log messages were sent to the remote console.  The fix now distinguishes between verbose log messages and cli command output sent to a remote console.
> 
> 
> Diffs
> -----
> 
>   branches/11/include/asterisk/cli.h 398227 
>   branches/11/main/asterisk.c 398227 
>   branches/11/main/cli.c 398227 
>   branches/11/main/logger.c 398227 
> 
> Diff: https://reviewboard.asterisk.org/r/2825/diff/
> 
> 
> Testing
> -------
> 
> Duplicated issues.  Then ran scenarios again and observed that the issues were no longer occurring.  Also tried several other combinations of log levels and cli commands between consoles (local/remote).
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

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


More information about the asterisk-dev mailing list