diff options
author | Muxi Yan <mxyan@google.com> | 2017-11-27 14:35:34 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-11-27 14:35:34 -0800 |
commit | 9898212a4181fee4d9967cfbf42576b4a7f7e529 (patch) | |
tree | da311844d93891c031b279024c0b0f3d7fe0889a /src/core/lib/surface/api_trace.h | |
parent | 739ff08a7f4686306ef8d5b72c2a89b12305e275 (diff) | |
parent | fbe8ff657ccb742daedae11a1029f5628de07ce7 (diff) |
Merge remote-tracking branch 'upstream/master' into fix-objc-void-func
Diffstat (limited to 'src/core/lib/surface/api_trace.h')
-rw-r--r-- | src/core/lib/surface/api_trace.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/lib/surface/api_trace.h b/src/core/lib/surface/api_trace.h index 105abdf629..a4e11ce154 100644 --- a/src/core/lib/surface/api_trace.h +++ b/src/core/lib/surface/api_trace.h @@ -22,11 +22,7 @@ #include <grpc/support/log.h> #include "src/core/lib/debug/trace.h" -#ifdef __cplusplus -extern "C" { -#endif - -extern grpc_tracer_flag grpc_api_trace; +extern grpc_core::TraceFlag grpc_api_trace; /* Provide unwrapping macros because we're in C89 and variadic macros weren't introduced until C99... */ @@ -47,12 +43,8 @@ extern grpc_tracer_flag grpc_api_trace; /* Due to the limitations of C89's preprocessor, the arity of the var-arg list 'nargs' must be specified. */ #define GRPC_API_TRACE(fmt, nargs, args) \ - if (GRPC_TRACER_ON(grpc_api_trace)) { \ + if (grpc_api_trace.enabled()) { \ gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \ } -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SURFACE_API_TRACE_H */ |