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

SetVLOGLevel does not work if VLOG_IS_ON has already cached its module level #649

Closed
romange opened this issue May 10, 2021 · 0 comments · Fixed by #650
Closed

SetVLOGLevel does not work if VLOG_IS_ON has already cached its module level #649

romange opened this issue May 10, 2021 · 0 comments · Fixed by #650

Comments

@romange
Copy link
Contributor

romange commented May 10, 2021

below is the minimal example that demonstrates the issue.
I can send the possible fix.

int TestVlogHelper() {
  if (VLOG_IS_ON(1)) {
    return 1;
  }
  return 0;
}

void TestVLogModule() {
  int c = TestVlogHelper();
  CHECK_EQ(0, c);

  CHECK_EQ(0, SetVLOGLevel("logging_unittest", 1));
  c = TestVlogHelper();   
  CHECK_EQ(1, c);   // Fails here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants