Skip to content
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

_ALWAYS_CLEAN_LOGS when defined cleans log away when ending application #22

Closed
abumq opened this issue Feb 3, 2013 · 0 comments
Closed
Labels

Comments

@abumq
Copy link
Owner

abumq commented Feb 3, 2013

if you have _END_EASYLOGGINGPP in the middle of application and have _ALWAYS_CLEAN_LOGS defined, it cleans out all the logs every time we re-log something after _END_EASYLOGGINGPP

For example:

 int sum(int a, int b) {
   INFO("Adding " << a << " and " << b);
   _END_EASYLOGGINGPP
   return a+b;
 }
 int main() {
   sum(1,2);
   INFO("..."); // this will clean the logs (if compiled using `-D _ALWAYS_CLEAN_LOGS`) since we have `END_EASYLOGGINGPP` in sum(..)
   _END_EASYLOGGINGPP
 }
FUNC(int, main, (int argc, char** argv))

   _END_EASYLOGGING
END_FUNC(0)

because END_FUNC macro logs performance of function so the logs are cleaned out (because of preceeding _END_EASYLOGGINGPP)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant