From 91e7fc11adbe34a402002b6131d19876616180b3 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 8 Oct 2012 00:56:52 -0700 Subject: [PATCH] Some comments. --- src/Log.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Log.h b/src/Log.h index 2884b7e25d..e9359a900d 100644 --- a/src/Log.h +++ b/src/Log.h @@ -13,11 +13,16 @@ #include "types.h" +// Put at the beginning of a C++ file that needs its own log partition #define SETUP_LOG() static LogPartition logPartition(__FILE__) -#define tLog(c,x) if (!logPartition.doLog(x) || !(c)) do {} while(0); else Log(x) +// Standard conditional log #define cLog(x) if (!logPartition.doLog(x)) do {} while (0); else Log(x) +// Log only if an additional condition 'c' is true. Condition is not computed if not needed +#define tLog(c,x) if (!logPartition.doLog(x) || !(c)) do {} while(0); else Log(x) + + enum LogSeverity { lsTRACE = 0,