[Gpr_To_Absl_Logging] Remove gpr_log_severity_string (#37013)

[Gpr_To_Absl_Logging] Remove gpr_log_severity_string

This function is not getting used anymore gpr_log_severity_string

Closes #37013

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37013 from tanvi-jagtap:gpr_log_severity_string_remove 3346face4c
PiperOrigin-RevId: 645796077
pull/36942/head^2
Tanvi Jagtap 5 months ago committed by Copybara-Service
parent 56b3686229
commit f416b31eec
  1. 1
      grpc.def
  2. 3
      include/grpc/support/log.h
  3. 12
      src/core/util/log.cc
  4. 2
      src/ruby/ext/grpc/rb_grpc_imports.generated.c
  5. 3
      src/ruby/ext/grpc/rb_grpc_imports.generated.h
  6. 5
      tools/run_tests/sanity/banned_functions.py

1
grpc.def generated

@ -230,7 +230,6 @@ EXPORTS
gpr_free_aligned
gpr_cpu_num_cores
gpr_cpu_current_cpu
gpr_log_severity_string
gpr_log
gpr_should_log
gpr_log_message

@ -41,9 +41,6 @@ typedef enum gpr_log_severity {
GPR_LOG_SEVERITY_ERROR
} gpr_log_severity;
/** Returns a string representation of the log severity */
GPRAPI const char* gpr_log_severity_string(gpr_log_severity severity);
/** Macros to build log contexts at various severity levels */
#define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
#define GPR_INFO __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO

@ -44,18 +44,6 @@ void gpr_unreachable_code(const char* reason, const char* file, int line) {
grpc_core::SourceLocation(file, line));
}
const char* gpr_log_severity_string(gpr_log_severity severity) {
switch (severity) {
case GPR_LOG_SEVERITY_DEBUG:
return "D";
case GPR_LOG_SEVERITY_INFO:
return "I";
case GPR_LOG_SEVERITY_ERROR:
return "E";
}
GPR_UNREACHABLE_CODE(return "UNKNOWN");
}
int gpr_should_log(gpr_log_severity severity) {
switch (severity) {
case GPR_LOG_SEVERITY_ERROR:

@ -253,7 +253,6 @@ gpr_malloc_aligned_type gpr_malloc_aligned_import;
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_severity_string_type gpr_log_severity_string_import;
gpr_log_type gpr_log_import;
gpr_should_log_type gpr_should_log_import;
gpr_log_message_type gpr_log_message_import;
@ -542,7 +541,6 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned");
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_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
gpr_should_log_import = (gpr_should_log_type) GetProcAddress(library, "gpr_should_log");
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");

@ -735,9 +735,6 @@ extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
typedef unsigned(*gpr_cpu_current_cpu_type)(void);
extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
extern gpr_log_severity_string_type gpr_log_severity_string_import;
#define gpr_log_severity_string gpr_log_severity_string_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

@ -48,10 +48,7 @@ DEPRECATED_FUNCTION_TEMP_ALLOW_LIST = {
"./src/ruby/ext/grpc/rb_grpc_imports.generated.h",
"./test/core/end2end/tests/no_logging.cc",
],
"gpr_log_severity_string(": [
"./include/grpc/support/log.h",
"./src/core/util/log.cc",
],
"gpr_log_severity_string": [],
"gpr_log(": [
"./include/grpc/support/log.h",
"./src/core/ext/filters/backend_metrics/backend_metric_filter.cc",

Loading…
Cancel
Save