[Gpr_To_Absl_Logging] Fixing unit test that flags log noise

pull/37202/head
tanvi-jagtap 8 months ago
parent 6265ed134a
commit 68bfdef869
  1. 14
      src/core/util/log.cc

@ -115,15 +115,17 @@ void gpr_log_verbosity_init(void) {
absl::string_view verbosity = grpc_core::ConfigVars::Get().Verbosity();
DVLOG(2) << "Log verbosity: " << verbosity;
if (absl::EqualsIgnoreCase(verbosity, "INFO")) {
LOG(WARNING) << "Not suitable for production. Prefer WARNING or ERROR. "
"However if you see this message in a debug environmenmt "
"or test environmenmt it is safe to ignore this message.";
LOG_FIRST_N(WARNING, 1)
<< "Not suitable for production. Prefer WARNING or ERROR. "
"However if you see this message in a debug environmenmt "
"or test environmenmt it is safe to ignore this message.";
absl::SetVLogLevel("*grpc*/*", -1);
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo);
} else if (absl::EqualsIgnoreCase(verbosity, "DEBUG")) {
LOG(WARNING) << "Not suitable for production. Prefer WARNING or ERROR. "
"However if you see this message in a debug environmenmt "
"or test environmenmt it is safe to ignore this message.";
LOG_FIRST_N(WARNING, 1)
<< "Not suitable for production. Prefer WARNING or ERROR. "
"However if you see this message in a debug environmenmt "
"or test environmenmt it is safe to ignore this message.";
absl::SetVLogLevel("*grpc*/*", 2);
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo);
} else if (absl::EqualsIgnoreCase(verbosity, "ERROR")) {

Loading…
Cancel
Save