Startup and Announcing |
Top Previous Next |
It may be useful to ask the JrDebugLog functions to generate an initial output message announcing that it is running and its current version on startup. That way you can see that debug messages are getting through:
void JrDebug::Announce(char* appdescription,bool evenifdisabled, int argc, char **argv)
By calling it with evenifdisabled=true, the announcement will be made even if debugging is disabled (though no output will be seen if debugging is 'compiled-out'). The announcement will look like:
JrDebug version 1.00.09 - Test Application - (enabled=1 asserts=0 exceptions=0) - ComlineArgs(3) [demo,myarg1,myarg2]
If you want to make sure that you don't release an application with the debug code accidentally compiling-in or compiling-out, you can use the following calls, which will result in compilation errors if they are not met:
JrDebugLog::ErrorIfNotCompiledIn(); JrDebugLog::ErrorIfCompiledIn();
|