Logging APIs
MXOLogComponent
A list of components to filter the messages the MXO SDK will log.
typedef NS_OPTIONS(NSUInteger, MXOLogComponent) {
MXOLogComponentNone = 1,
MXOLogComponentAny = 1 << 1,
MXOLogComponentInteraction = 1 << 2,
MXOLogComponentNetworking = 1 << 3
};
Enum | Description |
---|---|
MXOLogComponentAny | The combination of all components listed below other than MXOLogComponentNone . |
MXOLogComponentInteraction | Interaction tracking log messages. |
MXOLogComponentNetworking | Networking log messages. |
MXOLogComponentNone | Neither of the components listed above is logged. Used to opt out of logging. |
MXOLoggingConfiguration
The logging configuration object for the MXO SDK.
@interface MXOLoggingConfiguration : NSObject
@property (nonatomic, assign, readonly) MXOLogLevel logLevel;
@property (nonatomic, assign, readonly) MXOLogComponent logComponent;
@end
Property | Type | Description |
---|---|---|
logLevel | MXOLogLevel | A set of MXO log levels. |
logComponent | MXOLogComponent | A set of MXO log components. |
Create an instance using the Builder as shown below:
MXOLoggingConfiguration *loggingConfiguration = [MXOLoggingConfiguration initWithBuilder:^(MXOLoggingConfigurationBuilder * _Nonnull builder) {
builder.logLevel = (MXOLogLevelVerbose);
builder.logComponent = (MXOLogComponentAny);
}];
MXOLogLevel
A list of levels (IE severity) to filter the messages the MXO SDK will log.
Every level is logged, plus those that are less critical than it.
typedef NS_OPTIONS(NSUInteger, MXOLogLevel) {
MXOLogLevelNone = 1,
MXOLogLevelVerbose = 1 << 1,
MXOLogLevelInfo = 1 << 2,
MXOLogLevelWarn = 1 << 3,
MXOLogLevelError = 1 << 4,
MXOLogLevelDebug = 1 << 5
};
Enum | Description |
---|---|
MXOLogLevelVerbose | Any amount of detail might be logged. |
MXOLogLevelDebug | Debug details are logged, and all the levels below. |
MXOLogLevelError | Error details are logged, and all the levels below. |
MXOLogLevelWarn | Warning details are logged, and all the levels below. |
MXOLogLevelInfo | Info details are logged, and the level below. |
MXOLogLevelNone | Neither of the levels listed above is logged. Used to opt out of logging. |