googletest icon indicating copy to clipboard operation
googletest copied to clipboard

[FR]: Add new GTest log level DEBUG

Open IvanPizhenko opened this issue 3 months ago • 4 comments

Does the feature exist in the most recent commit?

No

Why do we need this feature?

Sometimes it is needed to have debug output in the tests and later to disable it, it's easier to not comment it out, just change log level to higher.

Describe the proposal.

In the enum GTestLogSeverity add new constant GTEST_DEBUG (as the first one in the enum definition) and change code whenever its adding affects (before the first one in the enum was GTEST_DEBUG). To avoid possible breakage of existing code, which expects GTEST_INFO to have value 0, maybe it will be more wise to define it as GTEST_DEBUG = -1.

Is the feature specific to an operating system, compiler, or build system version?

No

IvanPizhenko avatar Jul 11 '25 08:07 IvanPizhenko