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

Russell Bryant russell at digium.com
Wed Apr 5 16:16:42 MST 2006


casper at casper.org.ua wrote:
>> Why is that else in there?  Doesn't that do the opposite?
> 
> Now it is:
> 
> #define AST_VERBOSE(level, args, ...) \

Another option would just be to add the level as an argument to 
ast_verbose, and not have to add macros.  Furthermore, we could make it 
include the verbose prefix automatically.

if (option_verbose > 3)
    ast_verbose(VERBOSE_PREFIX_3 "Hi!\n");

would become:

ast_verbose(3, "Hi!\n");

Russell



More information about the asterisk-dev mailing list