I was surprised to see my logs showing up in release mode both in Windows and Mac.
In windows it uses
OutputDebugString ((text + "\n").toWideCharPointer());
And in Mac:
std::cerr << text << std::endl;
I run a short search in Stackoverflow and found one way to tackle this (Windows):
#define LOGMESSAGE( str ) OutputDebugString( str );
#define LOGMESSAGE( str )
It depends what you’re using to write to the log… If you use the DBG macro, then it’s disabled in release mode.
oh, thanks Jules.
I’ll replace the calls to DBG.
Wouldn’t it also be better to change WriteToLog() to use DBG?
void Logger::writeToLog (const String& message)
if (currentLogger != nullptr)
No. If it was supposed to work like that, I’d have called it “writeToLogExceptInReleaseMode”.
Most of my bugs are in my Release build. They disappear in the Debug verison
Most of my bugs are in my Release build. They disappear in the Debug verison :-([/quote]
That sounds familiar. Many of mine only activate when they leave my office.