|
|
@ -79,9 +79,9 @@ void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) { |
|
|
|
|
|
|
|
|
|
|
|
void gpr_log_verbosity_init() { |
|
|
|
void gpr_log_verbosity_init() { |
|
|
|
char *verbosity = gpr_getenv("GRPC_VERBOSITY"); |
|
|
|
char *verbosity = gpr_getenv("GRPC_VERBOSITY"); |
|
|
|
if (verbosity == NULL) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gpr_atm min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; |
|
|
|
gpr_atm min_severity_to_print = GPR_LOG_SEVERITY_ERROR; |
|
|
|
|
|
|
|
if (verbosity != NULL) { |
|
|
|
if (strcmp(verbosity, "DEBUG") == 0) { |
|
|
|
if (strcmp(verbosity, "DEBUG") == 0) { |
|
|
|
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; |
|
|
|
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; |
|
|
|
} else if (strcmp(verbosity, "INFO") == 0) { |
|
|
|
} else if (strcmp(verbosity, "INFO") == 0) { |
|
|
@ -90,6 +90,7 @@ void gpr_log_verbosity_init() { |
|
|
|
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR; |
|
|
|
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR; |
|
|
|
} |
|
|
|
} |
|
|
|
gpr_free(verbosity); |
|
|
|
gpr_free(verbosity); |
|
|
|
|
|
|
|
} |
|
|
|
if ((gpr_atm_no_barrier_load(&g_min_severity_to_print)) == |
|
|
|
if ((gpr_atm_no_barrier_load(&g_min_severity_to_print)) == |
|
|
|
GPR_LOG_VERBOSITY_UNSET) { |
|
|
|
GPR_LOG_VERBOSITY_UNSET) { |
|
|
|
gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print); |
|
|
|
gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print); |
|
|
|