[asterisk-dev] [Code Review]: Separate verbose level for logging

Tilghman Lesher reviewboard at asterisk.org
Mon Nov 28 10:24:56 CST 2011



> On Nov. 28, 2011, 4:06 a.m., Tzafrir Cohen wrote:
> > /trunk/configs/logger.conf.sample, line 97
> > <https://reviewboard.asterisk.org/r/1599/diff/5/?file=21910#file21910line97>
> >
> >     Minor issue: A bare 'verbose' used to mean verbose(5) (with the terminology of current changes). Now it means verbose(3). Maybe the default should still be 5 for backward compatibility?
> 
> Tilghman Lesher wrote:
>     No, it inherited whatever level was active when Asterisk was started.  If you started Asterisk without ANY v's (or a verbose= setting in asterisk.conf), then it was 0.  And worse, if you changed the verbosity level during runtime, you would affect what would go to the log.

Most people, when they start Asterisk for ad-hoc testing, simply hold down the v key for a brief period.  That rarely means that verbosity is consistent, runtime-to-runtime.  Could be 5 or 7 or 16 or 22.  We could inherit from whatever option_verbose is set to at the time.  My issue with that, though, is that the verbosity level can be changed during runtime and a 'logger reload' would thus change the logger verbosity level, which
most people would consider unexpected behavior.

Thus, I think 3 is an acceptable default.


- Tilghman


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


On Nov. 28, 2011, 10:15 a.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1599/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2011, 10:15 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> One problem that many admins have today is that to have maximum verbosity going to the logs, for later debugging of trouble calls, the console becomes virtually unusable, because the verbosity level is global.  This patch attempts to solve that problem, allowing each verbose recipient to have its own filter as to what it wants to receive.
> 
> 
> Diffs
> -----
> 
>   /trunk/addons/chan_ooh323.c 346290 
>   /trunk/addons/res_config_mysql.c 346290 
>   /trunk/apps/app_rpt.c 346290 
>   /trunk/apps/app_verbose.c 346290 
>   /trunk/apps/app_voicemail.c 346290 
>   /trunk/channels/chan_sip.c 346290 
>   /trunk/channels/chan_skinny.c 346290 
>   /trunk/channels/chan_usbradio.c 346290 
>   /trunk/codecs/codec_dahdi.c 346290 
>   /trunk/configs/logger.conf.sample 346290 
>   /trunk/include/asterisk/logger.h 346290 
>   /trunk/main/asterisk.c 346290 
>   /trunk/main/bridging.c 346290 
>   /trunk/main/cli.c 346290 
>   /trunk/main/dial.c 346290 
>   /trunk/main/logger.c 346290 
>   /trunk/main/say.c 346290 
>   /trunk/res/res_clialiases.c 346290 
>   /trunk/res/res_fax.c 346290 
>   /trunk/res/res_jabber.c 346290 
>   /trunk/res/res_musiconhold.c 346290 
> 
> Diff: https://reviewboard.asterisk.org/r/1599/diff
> 
> 
> Testing
> -------
> 
> Verified logging with files, consoles with different verbosity levels, etc.
> 
> 
> Thanks,
> 
> Tilghman
> 
>

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


More information about the asterisk-dev mailing list