BBASMLogFileAdapterProtocol.h
1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// BBASMYalogAdapterProtocol.h
// BBAMNP
//
// Created by baidu on 2020/3/19.
// Copyright © 2020 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "BBASMsConsoleLogDef.h"
NS_ASSUME_NONNULL_BEGIN
/// log日志协议
@protocol BBASMLogFileAdapterProtocol <NSObject>
@optional
/**
* @brief log调用函数,调用手百日志
*
* @param appID 小程序标识
* @param module module 页面模块
* @param msg msg 错误信息
* @param fileName 类名
* @param lineNumber 行号
*/
+ (void)logToFileWithAppID:(NSString *)appID
level:(BBASMLogLevel)level
module:(NSString *)module
message:(NSString *)msg
fileName:(const char*)fileName
lineNumber:(int)lineNumber;
/// @brief 将日志copy到指定路径下
/// @param path 指定路径
/// @return copy日志是否成功
+ (BOOL)copyLogFileToPath:(NSString *)path;
/// @brief 压缩文件
/// @param souPath 被压缩的文件目录
/// @param desPath 压缩完成后的文件目录
/// @return 压缩是否成功
+ (BOOL)zipFilePath:(NSString *)souPath toDestinationPath:(NSString *)desPath;
@end
NS_ASSUME_NONNULL_END