diff --git a/grpc.def b/grpc.def index 4820cf14213..59bc8f2aa78 100644 --- a/grpc.def +++ b/grpc.def @@ -231,7 +231,6 @@ EXPORTS gpr_cpu_num_cores gpr_cpu_current_cpu gpr_log - absl_vlog2_enabled gpr_log_verbosity_init gpr_format_message gpr_strdup diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index 82e64a8c56f..d536bc85922 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -51,9 +51,6 @@ typedef enum gpr_log_severity { GPRAPI void gpr_log(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); -/** Deprecated. **/ -GPRAPI int absl_vlog2_enabled(); - GPRAPI void gpr_log_verbosity_init(void); #ifdef __cplusplus diff --git a/src/core/util/log.cc b/src/core/util/log.cc index 8e104f6bd65..d32c8373787 100644 --- a/src/core/util/log.cc +++ b/src/core/util/log.cc @@ -40,8 +40,6 @@ void gpr_unreachable_code(const char* reason, const char* file, int line) { grpc_core::SourceLocation(file, line)); } -int absl_vlog2_enabled() { return ABSL_VLOG_IS_ON(2); } - int gpr_should_log(gpr_log_severity severity) { switch (severity) { case GPR_LOG_SEVERITY_ERROR: diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 8dd2530cbc8..14bce49d37f 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -60,30 +60,30 @@ static VALUE grpc_rb_call_credentials_callback(VALUE args) { VALUE callback_func = rb_ary_entry(args, 0); VALUE callback_args = rb_ary_entry(args, 1); VALUE md_ary_obj = rb_ary_entry(args, 2); - if (absl_vlog2_enabled()) { - VALUE callback_func_str = rb_funcall(callback_func, rb_intern("to_s"), 0); - VALUE callback_args_str = rb_funcall(callback_args, rb_intern("to_s"), 0); - VALUE callback_source_info = - rb_funcall(callback_func, rb_intern("source_location"), 0); - if (callback_source_info != Qnil) { - VALUE source_filename = rb_ary_entry(callback_source_info, 0); - VALUE source_line_number = rb_funcall( - rb_ary_entry(callback_source_info, 1), rb_intern("to_s"), 0); - gpr_log(GPR_DEBUG, - "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " - "source_filename:%s line_number:%s with arguments:|%s|", - StringValueCStr(callback_func_str), - StringValueCStr(source_filename), - StringValueCStr(source_line_number), - StringValueCStr(callback_args_str)); - } else { - gpr_log(GPR_DEBUG, - "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " - "(failed to get source filename and line) with arguments:|%s|", - StringValueCStr(callback_func_str), - StringValueCStr(callback_args_str)); - } + + VALUE callback_func_str = rb_funcall(callback_func, rb_intern("to_s"), 0); + VALUE callback_args_str = rb_funcall(callback_args, rb_intern("to_s"), 0); + VALUE callback_source_info = + rb_funcall(callback_func, rb_intern("source_location"), 0); + if (callback_source_info != Qnil) { + VALUE source_filename = rb_ary_entry(callback_source_info, 0); + VALUE source_line_number = + rb_funcall(rb_ary_entry(callback_source_info, 1), rb_intern("to_s"), 0); + gpr_log(GPR_DEBUG, + "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " + "source_filename:%s line_number:%s with arguments:|%s|", + StringValueCStr(callback_func_str), + StringValueCStr(source_filename), + StringValueCStr(source_line_number), + StringValueCStr(callback_args_str)); + } else { + gpr_log(GPR_DEBUG, + "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " + "(failed to get source filename and line) with arguments:|%s|", + StringValueCStr(callback_func_str), + StringValueCStr(callback_args_str)); } + VALUE metadata = rb_funcall(callback_func, rb_intern("call"), 1, callback_args); grpc_metadata_array* md_ary = NULL; diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 36e66f82b86..31cb6523097 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -254,7 +254,6 @@ gpr_free_aligned_type gpr_free_aligned_import; gpr_cpu_num_cores_type gpr_cpu_num_cores_import; gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; gpr_log_type gpr_log_import; -absl_vlog2_enabled_type absl_vlog2_enabled_import; gpr_log_verbosity_init_type gpr_log_verbosity_init_import; gpr_format_message_type gpr_format_message_import; gpr_strdup_type gpr_strdup_import; @@ -539,7 +538,6 @@ void grpc_rb_load_imports(HMODULE library) { gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores"); gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu"); gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log"); - absl_vlog2_enabled_import = (absl_vlog2_enabled_type) GetProcAddress(library, "absl_vlog2_enabled"); gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init"); gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message"); gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 8ddd62a7ce9..02aee5008a7 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -738,9 +738,6 @@ extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); extern gpr_log_type gpr_log_import; #define gpr_log gpr_log_import -typedef int(*absl_vlog2_enabled_type)(); -extern absl_vlog2_enabled_type absl_vlog2_enabled_import; -#define absl_vlog2_enabled absl_vlog2_enabled_import typedef void(*gpr_log_verbosity_init_type)(void); extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import; #define gpr_log_verbosity_init gpr_log_verbosity_init_import diff --git a/tools/run_tests/sanity/banned_functions.py b/tools/run_tests/sanity/banned_functions.py index ec8e8b2ec14..9db09d82699 100755 --- a/tools/run_tests/sanity/banned_functions.py +++ b/tools/run_tests/sanity/banned_functions.py @@ -37,11 +37,6 @@ os.chdir(os.path.join(os.path.dirname(sys.argv[0]), "../../..")) # Map of deprecated functions to allowlist files DEPRECATED_FUNCTION_TEMP_ALLOW_LIST = { - "absl_vlog2_enabled(": [ - "./include/grpc/support/log.h", - "./src/core/util/log.cc", - "./src/ruby/ext/grpc/rb_call_credentials.c", - ], "gpr_log_severity": [ "./include/grpc/support/log.h", "./src/core/util/android/log.cc",