diff --git a/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2Service.swift b/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2Service.swift index 8db5f5b28..737c0db08 100644 --- a/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2Service.swift +++ b/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2Service.swift @@ -182,7 +182,7 @@ public actor PONetcetera3DS2Service: PO3DS2Service { // - I011: Available locale identifiers try builder.restrictedParameters(["I003", "I011"]) } - try builder.log(to: .error) + try builder.log(to: self.configuration.logLevel) } catch { throw POFailure( message: "Unable to create configuration parameters.", code: .Mobile.generic, underlyingError: error diff --git a/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2ServiceConfiguration.swift b/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2ServiceConfiguration.swift index f372c5b98..004ef3f34 100644 --- a/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2ServiceConfiguration.swift +++ b/Sources/ProcessOutNetcetera3DS/Sources/Service/PONetcetera3DS2ServiceConfiguration.swift @@ -35,7 +35,8 @@ public struct PONetcetera3DS2ServiceConfiguration { showsProgressView: Bool = true, bridgingExtensionVersion: BridgingExtensionVersion? = nil, returnUrl: URL? = nil, - challengeTimeout: TimeInterval = 5 * 60 + challengeTimeout: TimeInterval = 5 * 60, + logLevel: LogLevel = .error ) { self.authenticationMode = authenticationMode self.locale = locale @@ -44,6 +45,7 @@ public struct PONetcetera3DS2ServiceConfiguration { self.bridgingExtensionVersion = bridgingExtensionVersion self.returnUrl = returnUrl self.challengeTimeout = challengeTimeout + self.logLevel = logLevel } /// Defines the mode of device information collection. @@ -75,4 +77,7 @@ public struct PONetcetera3DS2ServiceConfiguration { /// Timeout interval within which the challenge process must be completed. /// The minimum timeout interval is defined to be 5 minutes. public let challengeTimeout: TimeInterval + + /// Netcetera SDK log level. Defaults to `.error`. + public let logLevel: LogLevel }