For release builds I want all verbose and lower log calls omitted from code Ex:
LOG_VERBOSE(...) // macro
LOG_DEBUG(...); // macro
where the macros are wrapped in a #ifdef such that it is removed depending on what -D is built with?
ex. Building with -DLOG_LEVEL=6
enables LOG levels 0..6 for debug releases but -DLOG_LEVEL=1 only allows error, warnings stripping everything else out of the .o file.
void log_debug( … ) { if ( LOG_LEVEL >= 6 ) { // logging stuff here. } }