Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

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

@romange

Description

@romange

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.
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions