Make default log verbosity ERROR, run tests with DEBUG

pull/7438/head
Craig Tiller 8 years ago
parent 24ae8eaa8d
commit 8f18ee64b2
  1. 19
      src/core/lib/support/log.c
  2. 7
      tools/run_tests/run_tests.py

@ -79,17 +79,18 @@ 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 (strcmp(verbosity, "DEBUG") == 0) { if (verbosity != NULL) {
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; if (strcmp(verbosity, "DEBUG") == 0) {
} else if (strcmp(verbosity, "INFO") == 0) { min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG;
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO; } else if (strcmp(verbosity, "INFO") == 0) {
} else if (strcmp(verbosity, "ERROR") == 0) { min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO;
min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR; } 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)) == 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);

@ -60,7 +60,9 @@ _ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
os.chdir(_ROOT) os.chdir(_ROOT)
_FORCE_ENVIRON_FOR_WRAPPERS = {} _FORCE_ENVIRON_FOR_WRAPPERS = {
'GRPC_VERBOSITY': 'DEBUG',
}
_POLLING_STRATEGIES = { _POLLING_STRATEGIES = {
@ -158,7 +160,8 @@ class CLanguage(object):
for polling_strategy in polling_strategies: for polling_strategy in polling_strategies:
env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH':
_ROOT + '/src/core/lib/tsi/test_creds/ca.pem', _ROOT + '/src/core/lib/tsi/test_creds/ca.pem',
'GRPC_POLL_STRATEGY': polling_strategy} 'GRPC_POLL_STRATEGY': polling_strategy,
'GRPC_VERBOSITY': 'DEBUG'}
shortname_ext = '' if polling_strategy=='all' else ' polling=%s' % polling_strategy shortname_ext = '' if polling_strategy=='all' else ' polling=%s' % polling_strategy
if self.config.build_config in target['exclude_configs']: if self.config.build_config in target['exclude_configs']:
continue continue

Loading…
Cancel
Save