AWSDRegisteredDynamicLogging

Objective-C

@protocol AWSDRegisteredDynamicLogging

Swift

protocol AWSDRegisteredDynamicLogging

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:(AWSDDLogLevel)level
     {
         ddLogLevel = level;
     }
    

    Declaration

    Objective-C

    @property (class, nonatomic, assign, unsafe_unretained, readwrite,
              setter=ddSetLogLevel:) AWSDDLogLevel ddLogLevel;

    Swift

    static var ddLogLevel: AWSDDLogLevel { get set }