summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/Base/Log.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Base/Log.h b/Swiften/Base/Log.h
index f8d524b..a46860f 100644
--- a/Swiften/Base/Log.h
+++ b/Swiften/Base/Log.h
@@ -38,3 +38,7 @@ namespace Swift {
#define SWIFT_LOG(severity) \
if (Log::severity > Log::getLogLevel()) ; \
else Log().getStream(Log::severity, #severity, __FILE__, __LINE__, __FUNCTION__)
+
+#define SWIFT_LOG_ASSERT(test, severity) \
+ if (Log::severity > Log::getLogLevel() || (test)) ; \
+ else Log().getStream(Log::severity, #severity, __FILE__, __LINE__, __FUNCTION__) << "Assertion failed: " << #test << ". "