P
pozzugno
I'd like to have debug messages during execution of my applications. I'd also like to enable/disable these messages at run-time with a command-line parameter (i.e., -d), or exclude them all with a #define (in order to improveperformance).
Moreover, it should be nice if the user that launches the application couldselect a "debug level" (with -d option at command line) to choose the verbosity of output messages. So, each message has an associated level: if thedebug level set by the user is greater or equal the message debug level, it will be printed on stderr.
Do you have any suggestions how to implement these functionalities with pre-processor macros or C code? It would be nice if this works also for "multi-files" projects.
Thank you
Moreover, it should be nice if the user that launches the application couldselect a "debug level" (with -d option at command line) to choose the verbosity of output messages. So, each message has an associated level: if thedebug level set by the user is greater or equal the message debug level, it will be printed on stderr.
Do you have any suggestions how to implement these functionalities with pre-processor macros or C code? It would be nice if this works also for "multi-files" projects.
Thank you