diff options
author | Craig Tiller <ctiller@google.com> | 2017-10-18 15:00:40 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-10-18 15:00:40 -0700 |
commit | 3c991309962418c447ee5b4f99fec396a4a3c3e1 (patch) | |
tree | a599506c8aac4d1f803a131369fd05e5cf3b30e4 /src/core/lib/debug | |
parent | 694580faee3a3bb91f9922a1d04125aa48f50bd5 (diff) |
Add debug-only trace flags
Diffstat (limited to 'src/core/lib/debug')
-rw-r--r-- | src/core/lib/debug/trace.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lib/debug/trace.h b/src/core/lib/debug/trace.h index c09aa01703..ad12e45127 100644 --- a/src/core/lib/debug/trace.h +++ b/src/core/lib/debug/trace.h @@ -80,6 +80,16 @@ class TraceFlag { #endif }; +#ifndef NDEBUG +typedef TraceFlag DebugOnlyTraceFlag; +#else +class DebugOnlyTraceFlag { + public: + DebugOnlyTraceFlag(bool default_enabled, const char *name) {} + bool enabled() { return false; } +}; +#endif + } // namespace grpc_core #endif // __cplusplus |