DDRegisteredDynamicLogging
Objective-C
@protocol DDRegisteredDynamicLogging
Swift
protocol DDRegisteredDynamicLogging
This protocol describes a dynamic logging component
-
Implement these methods to allow a file’s log level to be managed from a central location.
This is useful if you’d like to be able to change log levels for various parts of your code from within the running application.
Imagine pulling up the settings for your application, and being able to configure the logging level on a per file basis.
The implementation can be very straight-forward:
+ (int)ddLogLevel { return ddLogLevel; } + (void)ddSetLogLevel:(DDLogLevel)level { ddLogLevel = level; }
Declaration
Objective-C
@property (class, nonatomic, assign, unsafe_unretained, readwrite, setter=ddSetLogLevel:) DDLogLevel ddLogLevel;
Swift
static var ddLogLevel: DDLogLevel { get set }