diff options
author | Yuchen Zeng <zyc@google.com> | 2016-04-15 10:38:24 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-04-15 10:44:50 -0700 |
commit | 95e4c484306fa205ecc5bcc26caef258685c791e (patch) | |
tree | 884d1cf6cba28bb775a5fed8fcf384a6b3da1aa1 /include | |
parent | 700d36b6dfc8347ecd83e99f810d6574ae9a94aa (diff) |
Add knob for default core output verbosity
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc/impl/codegen/log.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index 0853350a26..c64b961b80 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -38,6 +38,7 @@ #include <stdlib.h> /* for abort() */ #include <grpc/impl/codegen/port_platform.h> +#include <grpc/support/atm.h> #ifdef __cplusplus extern "C" { @@ -61,6 +62,8 @@ typedef enum gpr_log_severity { GPR_LOG_SEVERITY_ERROR } gpr_log_severity; +#define GPR_LOG_VERBOSITY_UNSET -1 + /* Returns a string representation of the log severity */ const char *gpr_log_severity_string(gpr_log_severity severity); @@ -77,6 +80,11 @@ GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, GPRAPI void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message); +/* Set global log verbosity */ +GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print); + +GPRAPI void gpr_log_verbosity_init(); + /* Log overrides: applications can use this API to intercept logging calls and use their own implementations */ |