Added new function, OutputLogMessageF, which contains most of the functionality of OutputDebugStringF.
OutputLogMessageF has two additional parameters over OutputDebugStringF: an enum indicating the context of the message, and an enum indicating the verbosity level.
The existing OutputDebugStringF forwards itself to OutputLogMessageF, passing enum values indicating a log context "Legacy", and verbosity "Debug".
Additional functions have been added to support the feature. These functions:
- add and parse command-line options -logcontexts and -loglevel to set the logging context and log verbosity (respectively)
- change logging context and verbosity programattically
Several of the calls to OutputDebugStringF in main.cpp (which are hidden by the macro 'printf') have been changed to use OutputLogMessageF, to demonstrate how the new logging system works. I have not changed all occurrences (there are still 90 occurrences in main.cpp, and I haven't even touched most of the other files).
The change has been designed in such a way that migration to the OutputLogMessageF can take place as developers work on various sections of the code. The existing 'printf' calls still work, and can be viewed by using the command line options -loglevel=debug -logcontexts=legacy.