diff --git a/CHANGELOG.md b/CHANGELOG.md index 82ef03eec..9409b3df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Deprecate `tag` property of `DDLogMessage`, use `representedObject` instead. (#1177, #532) - Add per-message synchronous logging control for messages logged via SwiftLog using `DDLogHandler` (#1209) - Prevent logging an error when archiving an already deleted file (#1212) +- Add `DDAssertionFailure` macro for Objective-C (#1220) ### Internal diff --git a/Sources/CocoaLumberjack/include/CocoaLumberjack/DDAssertMacros.h b/Sources/CocoaLumberjack/include/CocoaLumberjack/DDAssertMacros.h index 8161bf977..8427576ee 100644 --- a/Sources/CocoaLumberjack/include/CocoaLumberjack/DDAssertMacros.h +++ b/Sources/CocoaLumberjack/include/CocoaLumberjack/DDAssertMacros.h @@ -23,3 +23,8 @@ NSAssert(NO, @"%@", description); \ } #define DDAssertCondition(condition) DDAssert(condition, @"Condition not satisfied: %s", #condition) + +/** + * Analog to `DDAssertionFailure` from DDAssert.swift for use in Objective C + */ +#define DDAssertionFailure(frmt, ...) DDAssert(NO, frmt, ##__VA_ARGS__)