Alipay+ DocsAlipay+ Docs

setLoggerProxy

Call the setLoggerProxy API to set up a logger proxy for log printing. This proxy is optional.

Method signature

copy
public static func setLoggerProxy(_ proxy: IAPAPLoggerProxy)

Request parameters

Parameter

Type

Required

Description

proxy

IAPAPLoggerProxy

Yes

The implementation of the logger proxy.

IAPAPLoggerProxy

copy
public protocol IAPAPLoggerProxy {
    func log(level: LoggerLevel, message: Any, file: String, line: Int, function: String)
}

IAPAPLoggerLevel

Key

Value

Description

debug

0

Indicates the debug logs.

info

1

Indicates the info logs.

warning

2

Indicates the warning logs.

error

3

Indicates the error logs.

Response parameters

N/A

Sample

copy
IAPApplePay.setLoggerProxy(LoggerProxy())