DDMultiFormatter
Objective-C
@interface DDMultiFormatter : NSObject <DDLogFormatter>
Swift
class DDMultiFormatter : NSObject, DDLogFormatter
This formatter can be used to chain different formatters together. The log message will processed in the order of the formatters added.
-
Array of chained formatters
Declaration
Objective-C
@property (nonatomic, readonly) NSArray<id<DDLogFormatter>> *_Nonnull formatters;
Swift
var formatters: [DDLogFormatter] { get }
-
Add a new formatter
Declaration
Objective-C
- (void)addFormatter:(nonnull id<DDLogFormatter>)formatter;
Swift
func add(_ formatter: DDLogFormatter)
-
Remove a formatter
Declaration
Objective-C
- (void)removeFormatter:(nonnull id<DDLogFormatter>)formatter;
Swift
func remove(_ formatter: DDLogFormatter)
-
Remove all existing formatters
Declaration
Objective-C
- (void)removeAllFormatters;
Swift
func removeAll()
-
Check if a certain formatter is used
Declaration
Objective-C
- (BOOL)isFormattingWithFormatter:(nonnull id<DDLogFormatter>)formatter;
Swift
func isFormatting(with formatter: DDLogFormatter) -> Bool