From 3c991309962418c447ee5b4f99fec396a4a3c3e1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Oct 2017 15:00:40 -0700 Subject: Add debug-only trace flags --- src/core/lib/debug/trace.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/lib/debug') 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 -- cgit v1.2.3