For the complete documentation index, see llms.txt. This page is also available as Markdown.

DT Exchange Logging on iOS

The DT Exchange iOS SDK includes a built-in logging utility, DTXLogger, that monitors SDK behavior and streamlines integration debugging. You can control how much detail appears in the console output by setting the desired log level.

Set the log level before or immediately after calling initWithAppID() to ensure that initialization events are logged.

The following table describes the log level attributes.

Property Name
Description

.debug

Enables full logging. Use this for development.

.off

Disables all logging. Use this for production.

Setting the Log Level

To configure the library's logging level, call DTXLogger.setLogLevel and pass the desired log level.

The following example initializes the SDK and then sets the log level to .debug:

Swift
IASDKCore.sharedInstance()?.initWithAppID(
    appId,
    completionBlock: { success, error in
        if let error {
            print("DTExchange init failed: \(error.localizedDescription)")
        } else {
            print("DTExchange init success")
        }
    },
    completionQueue: .main
)

// Set the desired log level
// Use .debug for full logs during development or .off for production
DTXLogger.setLogLevel(.debug)

Last updated