[asterisk-dev] 0006889: [patch] Convert ast_verbose into macros
Andrey S. Pankov
casper at casper.org.ua
Thu Apr 6 08:18:21 MST 2006
> 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.
That will break third-party code, that's why macros are less annoying.
Your second idea is not good at all. This will result in ugly output
since lots of stuff use pre-defined formatting in different levels.
The rationale for proposed macros now is:
- make the code more readable with less indentation
- avoid code inclusion into if (option_verbose... blocks
- maintain backward compatibility for third-party code
- easy to use and less error-prone
Next step is to add macros for channel debugging. Every channel will
use the same macro - AST_CHAN_DEBUG, eliminating the need to check
wether sipdebug, skinnydebug or mgcpdebug are non-zero through the code.
That will be generic wrapper redefined for each channel to check
channel-specific *debug variable.
Any thoughts?
casper
More information about the asterisk-dev
mailing list