New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable all logs using ELPP_DISABLE_LOGS #365
Comments
@mkhan3189 please, could you provide any help on this question? |
Moving to |
Disable "Global" log in configuration. Sorry i have no access to computer at the moment but you can see how configurations work in README |
By the way how are you using this macro (the one in question)? It's suppose to be available throughout the application so it's beat to define it via compiler flag to be safe (using -D) |
@taschetto
P.S, make sure to remove the <----- explanation as it is not a comment and will cause parsing error. |
I have found that the macro doesn't work when compiling with gcc, but it works correctly when using clang or MSVC. If you want an example you can see here one build with gcc which shows default logs although ELPP_DISABLE_LOGS is used, and two builds with clang where logs are effectively disabled. The macro is defined just before including easylogging++.h in the file with the main() mehod. |
in multiple files project macros should be defined using |
I can't use this preprocessor define either. Setting the ELPP_DISABLE_LOGS preprocessor flag does not turn off logging. This macro should probably redefine LOG and CLOG macros to do nothing instead so that the internal structure of easyloggerpp is not run at all if this is defined. I would like to completely turn off the logging in release mode and to have zero or close to zero impact on the performance of our code when this has been defined. |
Same here. Tried using ELPP_DISABLE_LOGS in VS2013 by including it in the preprocessor macros and it doesn't seem to have any effect. |
I've fixed this by changing 286 from To: |
Fix issue #365. ELPP_DISABLE_LOGS not working in VS
Closing issue as it is resolved and/or worked around. :) |
Greetings, folks.
I'm trying to disable logs whilst running my unit tests using
ELPP_DISABLE_LOGS
, but it doesn't work.This feature is commented out in
easylogging++.h
. Is there any way that I can disable all logs?Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: