diff options
author | 2017-07-12 07:50:09 -0700 | |
---|---|---|
committer | 2017-07-18 17:05:28 -0700 | |
commit | 79764a3bfbdec89b93b2f4a52b73e4b2ec275226 (patch) | |
tree | 12cfe4cb67995d11ab3f28f4ac58add974e49e92 /src/core/lib/support/log.c | |
parent | 85fac6df5711b418fabc87680d304e25171515f8 (diff) |
Quiet down getenv
Diffstat (limited to 'src/core/lib/support/log.c')
-rw-r--r-- | src/core/lib/support/log.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index bcc336b8ae..010dc65d6a 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -64,7 +64,8 @@ void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) { } void gpr_log_verbosity_init() { - char *verbosity = gpr_getenv("GRPC_VERBOSITY"); + char *verbosity = NULL; + char *insecure_getenv = gpr_getenv_silent("GRPC_VERBOSITY", &verbosity); gpr_atm min_severity_to_print = GPR_LOG_SEVERITY_ERROR; if (verbosity != NULL) { @@ -81,6 +82,12 @@ void gpr_log_verbosity_init() { GPR_LOG_VERBOSITY_UNSET) { gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print); } + + if (insecure_getenv != NULL) { + gpr_log(GPR_DEBUG, + "Warning: insecure environment read function '%s' used", + insecure_getenv); + } } void gpr_set_log_function(gpr_log_func f) { |