C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k
stars
918
forks
source link
easylogging++ disable DEBUG preprocessing flag #808
The preprocessing flag DEBUG is commonly used for many codebases. Usually, people seeking to debug use -DDEBUG in the compiler flags to activate debugging. However, if you are using easylogging++, you will have some weird behavior because easylogging++ disables (more appropriately, undefine) DEBUG (see here).
One way to circumvent this is to use the following piece at the beginning of your file:
The preprocessing flag
DEBUG
is commonly used for many codebases. Usually, people seeking to debug use-DDEBUG
in the compiler flags to activate debugging. However, if you are using easylogging++, you will have some weird behavior because easylogging++ disables (more appropriately, undefine)DEBUG
(see here).One way to circumvent this is to use the following piece at the beginning of your file:
This works fine, but it is a little bit inconvenient because you must do it on all files that include easylogging++.
Is that a reason we need to disable the flag
DEBUG
? Can you do it in another way?Thanks