Need some advice on how to deal with the log file in my game.
The way I do things at the moment is :
logfile << "some message about something.\n";
So the code only runs if there's a define for USE_LOG_FILE in a header somewhere.
What I'm thinking of doing instead is :-
logfile << "........\n";
Where the use_log is a variable set in the config file for the game.
This way means that the code is always run, even if it's just checking the if condition.
Is this way an acceptable way to do things ?
I prefer it because it means the log file doesn't have to get created.