Alipay+ DocsAlipay+ Docs

logWithName

The logWithName API is used to obtain the details of key events that occur during the interaction between the user and the SDK. The details can be used for debugging or logging.

Method signature

copy
@protocol IAPLogServiceProtocol 

- (void)logWithName:(NSString *)name parameter:(NSDictionary *)parameter;

@end

Request parameters

Name

Type

Length

Description

name

String

/

The name of the behavior or exception.

parameter

Map

/

The extra information.

Response parameters

N/A

Sample

copy
@interface YOUR_LOG_SERVICE_CLASS: NSObject <IAPLogServiceProtocol>
- (void)logWithName:(NSString *)name parameter:(NSDictionary *)parameter;
@end

@implementation YOUR_LOG_SERVICE_CLASS
- (void)logWithName:(NSString *)name parameter:(NSDictionary *)parameter {
    // your logic
}
@end
copy
[AlipayPlustClient shared].logService = YOUR_LOG_SERVICE_CLASS.new