> 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
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to