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 }
}
EnumDescription
anyThe combination of all components listed below other than none.
interactionInteraction tracking log messages.
networkingNetworking log messages.
noneNeither of the components listed above is logged. Used to opt out of logging.
Note: For more information, see how to use MXO components when configuring logging.

MXOLoggingConfiguration

The logging configuration object for the MXO SDK.

open class MXOLoggingConfiguration : NSObject {
	open var logLevel: MXOLogLevel { get }
	open var logComponent: MXOLogComponent { get }
}
PropertyTypeDescription
logLevelMXOLogLevelA set of MXO log levels.
logComponentMXOLogComponentA 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
}
Note: For more information, see how to configure logging.

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 }
}
EnumDescription
verboseAny amount of detail might be logged.
debugDebug details are logged, and all the levels below.
errorError details are logged, and all the levels below.
warnWarning details are logged, and all the levels below.
infoInfo details are logged, and the level below.
noneNeither of the levels listed above is logged. Used to opt out of logging.
Note: For more information, see how to use MXO log levels when configuring logging.