logog
logger optimized for games
|
During early stages of product development, you may want to spread DBUG() and INFO() type messages liberally across your code base in order to detect bugs earlier in the process. However, as your code develops you will want to omit these instructions entirely, as too many log messages will slow down your program.
To omit all logging messages of lower than a specific level at compilation time, #define the LOGOG_LEVEL constant to be some value from the following list:
All logging macros of a lower level will be omitted.
You may enable all logging messages in the following manner before loading logog.hpp:
And you may disable all logging messages with this before logog.hpp:
The standard warnings apply to incrementing or changing variables within a macro. For example:
The nExploded variable will only be incremented if LOGOG_LEVEL is set to LOGOG_LEVEL_INFO or lower.
In addition or alternately, you may dynamically change the logging level at run-time in your application by calling the SetDefaultLevel() function.