[asterisk-dev] [Code Review] Log 'stun set debug on' messages as ast_debug

Mark Michelson reviewboard at asterisk.org
Fri May 11 10:47:31 CDT 2012


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


In my view, this doesn't actually add any value to what's already there.

The problem with a change like this is that if you're really only interested in STUN messages, then you can't help but also either get a bunch of unrelated verbose messages or a bunch of unrelated debug messages as well. In either case, you have to issue two commands (setting the core debug level high enough and setting stun debug on, or setting the core verbose level high enough and setting stun debug on) in order to actually see STUN debug messages.

The best way to change this is to add a dynamic log level for STUN debug messages. When stun debug is set on, you enable the log level. When stun debug is turned off, you disable the log level. Then the stun debug messages are logged to the "stun" or "STUN" log instead of debug or verbose.

- Mark


On May 7, 2012, 3:52 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1904/
> -----------------------------------------------------------
> 
> (Updated May 7, 2012, 3:52 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Currently we use ast_verbose() for stun debug messages.  Since debug != verbose, this patch fixes that.
> 
> 
> Diffs
> -----
> 
>   trunk/main/stun.c 365563 
> 
> Diff: https://reviewboard.asterisk.org/r/1904/diff
> 
> 
> Testing
> -------
> 
> local development box
> 
> *CLI> stun set debug on
> <confirmed debug message logged>
> *CLI> stun set debug off
> 
> 
> Thanks,
> 
> Paul
> 
>

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


More information about the asterisk-dev mailing list