bonus-material-app/nativeplugins/Mpaas-Scan/ios/APRemoteLogging.framework/Headers/APLogAddions.h

136 lines
4.9 KiB
C
Raw Normal View History

2024-12-20 09:23:59 +08:00
//
// APLogAddions.h
// APRemoteLogging
//
// Created by tashigaofei on 15/10/13.
// Copyright © 2015年 Alipay. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AntLogInterface.h"
#import "MPLogCryptDelegate.h"
@interface APLogAdditions : NSObject<AntLogInterceptor>
/**
* UUIDUTDIDclientIDdeviceModellanguagemPaaS自动获取
*/
@property (nonatomic, strong, readonly) NSString *UUID __deprecated_msg("业务方需要自定义UUID时,请覆盖实现getBrandNewUUID方法."); // 默认实现为调用系统方法获取UUID
@property (nonatomic, strong, readonly) NSString *UTDID; // 默认实现为从APMobileIdentifier获取如果没有APMobileIdentifier会反射式调用UTDID库的[UTDevice utdid]方法
@property (nonatomic, strong, readonly) NSString *clientID; // 默认实现为从APMobileIdentifier获取如果没有APMobileIdentifier会返回@""
@property (nonatomic, strong) NSString *deviceModel; // 默认实现为从APMobileIdentifier获取如果没有APMobileIdentifier会调用系统方法获取设备型号
@property (nonatomic, strong) NSString *language; // 默认实现为读取NSUserDefaults中kAPLanguageSettingKey。如果使用钱包或mPaaS多语言模块该方法不需要重写
/**
* userID为可选参数Category中覆盖实现
*/
@property (nonatomic, strong) NSString *userID;
/**
* log日志服务器地址@""Category中覆盖http://mdap.alipaylog.com/loggw/log.do
*/
@property (nonatomic, strong) NSString *logServerURL;
/**
* log日志服务器配置地址@""Category中覆盖http://mdap.alipaylog.com/loggw/config.do
* logServerURL即可configServerURL系统会自动根据logServerURL进行修改
*/
@property (nonatomic, strong) NSString *configServerURL;
/**
* log日志服务器配置获取间隔Category中覆盖600s
*/
@property (nonatomic, assign) CFAbsoluteTime configGetInterval;
/**
* ID[[NSBundle mainBundle] objectForInfoDictionaryKey:@"Product ID"]Category中覆盖
*/
@property (nonatomic, strong) NSString *platformID;
/**
* [[NSBundle mainBundle] objectForInfoDictionaryKey:@"Product Version"]Category中覆盖
*/
@property (nonatomic, strong) NSString *clientVersion;
/**
* ,. 1024*1024*30L (30MB), Category中覆盖
*/
@property (nonatomic, assign) NSInteger maximumSizeOfLog;
/**
* ,. 256, Category中覆盖
*/
@property (nonatomic, assign) NSInteger maximumNumberOfLogFiles;
/**
,. 16K.
*/
@property (nonatomic, assign) NSInteger maximumLengthOfLine;
@property (nonatomic, strong) id<MPLogCryptDelegate> logCryptDelegate;
+ (instancetype)sharedInstance;
/**
* @[]
* @return @[@(APLogTypeXXX), @(APLogTypeYYY)]NSNumber类型
*/
- (NSArray*)defaultUploadLogTypes __deprecated_msg("All logs will write & upload without server config now. The return value of this method is ignored.");
/**
* 便
*
*/
- (void)logToFile:(NSString*)logStr;
/**
UUID.
UUID的时间戳是否超过了30分钟,,.
UUID: [NSUUID UUID].UUIDString
@return UUID字符串.
*/
- (NSString *)getBrandNewUUID;
/**
* Interceptor实现. NO.
* /Category中覆盖该方法返回YES beforeWrite: beforeUpload: .
* @return NO
*/
- (BOOL)hasInterceptor;
/**
* . Category中覆盖该方法.
*/
- (void)beforeWrite:(AntLogWriteOperation *)operations;
/**
* . Category中覆盖该方法.
*/
- (void)beforeUpload:(AntLogUploadOperation *)operation;
/**
IDFA值nilCategory里覆盖实现.
*/
- (NSString *)idfa;
/**
yes代表授权 no代表未授权
*/
- (BOOL)privacyAuthed;
/**
*/
+ (void)enableLogEncrypt:(BOOL)enable;
+ (BOOL)logEncrypt;
/**
Delegate
*/
+ (void)setLogCryptDelegate:(id<MPLogCryptDelegate>)delegate;
@end