diff options
author | Craig Tiller <ctiller@google.com> | 2016-07-18 08:00:33 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-07-18 08:00:33 -0700 |
commit | 8f18ee64b26d9a1462e8bccfb15aba00e8550492 (patch) | |
tree | 9f9d0ed7bab268a1c73eff845af74493acad30c1 /src/core/lib | |
parent | 24ae8eaa8d60e7b3b13381179c217796e01b6697 (diff) |
Make default log verbosity ERROR, run tests with DEBUG
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/support/log.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index bae0957df7..899f1218b6 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -79,17 +79,18 @@ void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) { void gpr_log_verbosity_init() { char *verbosity = gpr_getenv("GRPC_VERBOSITY"); - if (verbosity == NULL) return; - gpr_atm min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; - if (strcmp(verbosity, "DEBUG") == 0) { - min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; - } else if (strcmp(verbosity, "INFO") == 0) { - min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO; - } else if (strcmp(verbosity, "ERROR") == 0) { - min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR; + gpr_atm min_severity_to_print = GPR_LOG_SEVERITY_ERROR; + if (verbosity != NULL) { + if (strcmp(verbosity, "DEBUG") == 0) { + min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; + } else if (strcmp(verbosity, "INFO") == 0) { + min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO; + } else if (strcmp(verbosity, "ERROR") == 0) { + 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)) == GPR_LOG_VERBOSITY_UNSET) { gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print); |