From 7d9c895ba6f1cdb56925a5313b989ecb2c5217fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Mon, 8 Apr 2013 19:23:59 +0200 Subject: SWIFT_LOG_ASSERT macro. Change-Id: Id0dd8c566855e404b4e14c090e9e259d054ef34f 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 << ". " -- cgit v0.10.2-6-g49f6