#define macro for debug printing in C? - Stack Overflow
Feb 25, 2019 · #define DEBUG 1 To have logging statements compile to nothing, do. #define DEBUG 0 If you need info from a frequently executed piece of code (i.e. a high level of detail), you may want to write: DEBUGLOG_LOG(3, "the value is: %d", anint); If you define DEBUG to be 3, logging levels 1, 2 & 3 compile. If you set it to 2, you get logging levels 1 & 2.
DA: 89 PA: 89 MOZ Rank: 29