Skip to content

Commit ac3e19c

Browse files
committed
Merge branch 'master' of git://github.com/Shyotl/SingularityViewer
2 parents 4c7d222 + 3ab800d commit ac3e19c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

indra/llcommon/llerror.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,14 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
353353

354354
// NEW Macros for debugging, allow the passing of a string tag
355355

356+
#if SHOW_DEBUG
357+
#define DO_DEBUG_LOG if(true)
358+
#else
359+
#define DO_DEBUG_LOG if(false)
360+
#endif
361+
356362
// Pass comma separated list of tags (currently only supports up to 0, 1, or 2)
357-
#define LL_DEBUGS(...) lllog(LLError::LEVEL_DEBUG, false, false, ##__VA_ARGS__)
363+
#define LL_DEBUGS(...) DO_DEBUG_LOG lllog(LLError::LEVEL_DEBUG, false, false, ##__VA_ARGS__)
358364
#define LL_INFOS(...) lllog(LLError::LEVEL_INFO, false, false, ##__VA_ARGS__)
359365
#define LL_WARNS(...) lllog(LLError::LEVEL_WARN, false, false, ##__VA_ARGS__)
360366
#define LL_ERRS(...) lllog(LLError::LEVEL_ERROR, false, false, ##__VA_ARGS__)
@@ -363,12 +369,12 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
363369

364370
// Only print the log message once (good for warnings or infos that would otherwise
365371
// spam the log file over and over, such as tighter loops).
366-
#define LL_DEBUGS_ONCE(...) lllog(LLError::LEVEL_DEBUG, true, false, ##__VA_ARGS__)
372+
#define LL_DEBUGS_ONCE(...) DO_DEBUG_LOG lllog(LLError::LEVEL_DEBUG, true, false, ##__VA_ARGS__)
367373
#define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, false, ##__VA_ARGS__)
368374
#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, false, ##__VA_ARGS__)
369375

370376
// No function name
371-
#define LL_DEBUGS_NF(...) lllog(LLError::LEVEL_DEBUG, false, true, ##__VA_ARGS__)
377+
#define LL_DEBUGS_NF(...) DO_DEBUG_LOG {lllog(LLError::LEVEL_DEBUG, false, true, ##__VA_ARGS__)
372378
#define LL_INFOS_NF(...) lllog(LLError::LEVEL_INFO, false, true, ##__VA_ARGS__)
373379
#define LL_WARNS_NF(...) lllog(LLError::LEVEL_WARN, false, true, ##__VA_ARGS__)
374380
#define LL_ERRS_NF(...) lllog(LLError::LEVEL_ERROR, false, true, ##__VA_ARGS__)

0 commit comments

Comments
 (0)