summaryrefslogtreecommitdiffstats
path: root/src/LoggerSimple.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/LoggerSimple.h')
-rw-r--r--src/LoggerSimple.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/LoggerSimple.h b/src/LoggerSimple.h
index 7c984d2ca..37ed36bc6 100644
--- a/src/LoggerSimple.h
+++ b/src/LoggerSimple.h
@@ -94,3 +94,12 @@ void LOGERROR(std::string_view a_Format, const Args & ... args)
#endif // !NDEBUG
#define FLOGWARN FLOGWARNING
+
+// Conditionally log a warning
+#define CONDWARNING(ShouldLog, ...) \
+ do { \
+ if (ShouldLog) \
+ { \
+ LOGWARNING(__VA_ARGS__); \
+ } \
+ } while (false)