From 09fb035accc53578e2e38d952d78b207c7e4d22a Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 8 Oct 2012 00:47:44 -0700 Subject: [PATCH] Macro to supply an extra logging condition. --- src/Log.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Log.h b/src/Log.h index 409a8e476f..2884b7e25d 100644 --- a/src/Log.h +++ b/src/Log.h @@ -14,7 +14,9 @@ #include "types.h" #define SETUP_LOG() static LogPartition logPartition(__FILE__) -#define cLog(x) if (logPartition.doLog(x)) Log(x) + +#define tLog(c,x) if (!logPartition.doLog(x) || !(c)) do {} while(0); else Log(x) +#define cLog(x) if (!logPartition.doLog(x)) do {} while (0); else Log(x) enum LogSeverity {