From 729847ab76cc6ce45a25964980c687dbb90c7b37 Mon Sep 17 00:00:00 2001 From: Tanvi Jagtap Date: Mon, 22 Jul 2024 20:31:56 -0700 Subject: [PATCH] [Gpr_To_Absl_Logging] Removing deprecated code. 1. Function gpr_default_log has been deprecated. This function will be deleted in a few weeks. 1. This entire unit test is being re-written as a part of another PR. But that PR will take a while to merge. In the mean team I want to delete all instances of this function to prevent further backsliding. https://github.com/grpc/grpc/pull/37177 PiperOrigin-RevId: 654998772 --- test/core/end2end/tests/no_logging.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/core/end2end/tests/no_logging.cc b/test/core/end2end/tests/no_logging.cc index f7decbfddcd..faf53c2e1c7 100644 --- a/test/core/end2end/tests/no_logging.cc +++ b/test/core/end2end/tests/no_logging.cc @@ -35,8 +35,6 @@ #include "src/core/lib/gprpp/time.h" #include "test/core/end2end/end2end_tests.h" -void gpr_default_log(gpr_log_func_args* args); - namespace grpc_core { // This test is currently broken. // The whole test will be re-written as a part of gpr to absl log conversion. @@ -60,7 +58,6 @@ class Verifier { } ~Verifier() { // This is broken. Replace with an absl log sink. - gpr_set_log_function(gpr_default_log); saved_trace_flags_.Restore(); } Verifier(const Verifier&) = delete; @@ -90,12 +87,10 @@ class Verifier { auto it = allowed_logs_by_module->find(filename); if (it != allowed_logs_by_module->end() && std::regex_search(args->message, it->second)) { - gpr_default_log(args); return; } std::string message = absl::StrCat("Unwanted log: ", args->message); args->message = message.c_str(); - gpr_default_log(args); GTEST_FAIL(); } @@ -110,7 +105,7 @@ class Verifier { static std::atomic g_log_func_; }; -std::atomic Verifier::g_log_func_(gpr_default_log); +std::atomic Verifier::g_log_func_(NoErrorLog); void SimpleRequest(CoreEnd2endTest& test) { auto c = test.NewClientCall("/foo").Timeout(Duration::Seconds(5)).Create();