-
-
Notifications
You must be signed in to change notification settings - Fork 920
-
-
Notifications
You must be signed in to change notification settings - Fork 920
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
Issue with _DISABLE_DEBUG_LOGS ver 8.91, vs2010 #249
Comments
can you define it in makefile (or while compiling) |
oh in VS2010 ensure you do not have |
"can you define it in makefile (or while compiling) -D_DISABLE_DEBUG_LOGS also you need _DEBUG (which is defined by default when compiling in debug mode, see your compiler's command line args)"
|
I have added condition like this in header file: |
_DISABLE_LOGS disables all the levels whereas _DISABLE_DEBUG_LOGS only disables debug level |
I got the issue. |
Now what is happening is, |
I found this is happening because, |
I don't maintain v8.91 anymore, so if you find any error you can fork and make changes to the local repo :) this is a stable version and find it hard to keep two versions going on; so from version 9.xx i have used c++11 features |
Ok, actually, I am not able to _DISABLE_DEBUG_LOGS macro properly. |
why do you use macro? why not disable logs via configuration? more feasible, any way if you still want to do it, you need to define at high level (using |
My requirement is, I need to disable debug logs for release build and enable for debug build. How do we achieve same using configuration? |
Please see https://github.com/easylogging/easyloggingpp/tree/389a6e448097a4a5c7d30152d248c63c1087d15a#configuration-file and i dont think you need to check for _DEBUG as library does it internally |
update? |
It is working fine as you commented. |
I have added this macro in myinclude.h header file which includes easyloggingpp library.
Then in main.cpp I have initialzed the library.
in main function, I have added 3 logs as:
LINFO << "GUI Mode";
LDEBUG << "GUI Mode";
LERROR << "GUI Mode";
LWARNING << "GUI Mode";
After adding this macro in header file myinclude.h, all above logs are getting printed.
What I am missing here?
The text was updated successfully, but these errors were encountered: