Can the cerr be redefined inside an app ?
- {l Code}: {l Select All Code}
#ifdef CERR_DEBUG_BUILD_MODULE_1
#define LOG( x ) if(getSingeltonLogger->flags_set(!( __FILE__FLAG__NUMBER__ | __FUNCTION__FLAG__NUMBER) )) {}else { cerrLogPrint( x, __FILE__, __LINE__,__FUNCTION__ );}
#else
#define LOG( x )
#endif
where
void cerrLogPrint( const char* const log, const char* filename, unsigned int line)
{
//PRINT
}
We could also set diffrent debug macros for diffrent debug levels like info, warn, error, debug , whith the minimal level of severity of log we wanna get is specified as app's cmd line options ( the same regards the file's and function's names).