Logging APIs
MXOLogComponent
A list of components to filter the messages the MXO SDK will log.
public struct MXOLogComponent : OptionSet, @unchecked Sendable {
public init(rawValue: UInt)
public static var any: MXOLogComponent { get }
public static var interaction: MXOLogComponent { get }
public static var networking: MXOLogComponent { get }
public static var none: MXOLogComponent { get }
}
Enum | Description |
---|---|
any | The combination of all components listed below other than none . |
interaction | Interaction tracking log messages. |
networking | Networking log messages. |
none | Neither of the components listed above is logged. Used to opt out of logging. |
MXOLoggingConfiguration
The logging configuration object for the MXO SDK.
open class MXOLoggingConfiguration : NSObject {
open var logLevel: MXOLogLevel { get }
open var logComponent: MXOLogComponent { get }
}
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:
let loggingConfiguration = MXOLoggingConfiguration { builder in
builder.logLevel = .verbose
builder.logComponent = .any
}
MXOLogLevel
A list of levels (IE severity) to filter the messages the MXO SDK will log.
public struct MXOLogLevel : OptionSet, @unchecked Sendable {
public init(rawValue: UInt)
public static var verbose: MXOLogLevel { get }
public static var debug: MXOLogLevel { get }
public static var error: MXOLogLevel { get }
public static var warn: MXOLogLevel { get }
public static var info: MXOLogLevel { get }
public static var none: MXOLogLevel { get }
}
Enum | Description |
---|---|
verbose | Any amount of detail might be logged. |
debug | Debug details are logged, and all the levels below. |
error | Error details are logged, and all the levels below. |
warn | Warning details are logged, and all the levels below. |
info | Info details are logged, and the level below. |
none | Neither of the levels listed above is logged. Used to opt out of logging. |