[asterisk-dev] 0006889: [patch] Convert ast_verbose into macros

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Apr 6 08:47:54 MST 2006


On Thursday 06 April 2006 09:27, Kevin P. Fleming wrote:
> Russell Bryant wrote:
> > if (option_verbose > 3)
> >    ast_verbose(VERBOSE_PREFIX_3 "Hi!\n");
> >
> > would become:
> >
> > ast_verbose(3, "Hi!\n");
>
> The concern with this method, as I understand it, is that it causes
> the function call to ast_verbose (along with all the attendant
> argument processing and stack pushing/popping) to happen even if the
> message is not going to be generated at all.

But the other side of that is it would allow a very low verbose level
to be sent to the console, while letting a remote console display a much
higher verbose setting.  Currently, if the verbose level is not set high
on the console, those extra verbose messages cannot be seen on a remote
console.  Additionally, the way that we filter verbose messages to the
logger is, at best, a hack:  we scan and trim the leading characters of
verbose messages.

I honestly don't think the extra messages generate enough load to be
concerned on any box that Asterisk is capable of running on, anyway.
Use of a single good codec such as iLBC or G.729 is going to generate
more load than all the verbose messages in that same timeframe.

I'll throw my support behind Russell's suggestion.

-- 
Tilghman



More information about the asterisk-dev mailing list