-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added MODE_NOLOG #18
Added MODE_NOLOG #18
Conversation
…eprocessor macro argument validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
It seems that in NoLog you log empty strings, right? Is there a technical difference in just redirecting the calls to not doing anything at all, to logging empty strings? With empty string you'd probably still transfer \0 to the stream, not sure if that makes a difference though.
It actually doesn't log empty strings (The console would spam empty lines). The class InternalLog() {
public:
InternalLog() {
should_print_ = false;
};
virtual ~InternalLog() {
if (!should_print_) {
return; //Returns here
}
//print logic here
}
} When utilizing the |
Added MODE_NOLOG to disable logging completely. Useful for unittests where logging can be ignored or in some cases for release builds.
async_tests.h