Logger::writeToLog in Debug mode


I’m using the fileLogger to record logs in my app.
I have some audio callbacks and sometimes I turn on logs to see what’s going on.

The thing is that when I don’t want to use logs in debug mode, I can’t really get rid of them:

void Logger::writeToLog (const String& message)
    if (currentLogger != nullptr)
        currentLogger->logMessage (message);
        outputDebugString (message); 

Well, the best solution would be to use a macro or intermediate function instead of calling the logger directly, then you can make it do whatever you want.