-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTLCrash.h
40 lines (27 loc) · 880 Bytes
/
TLCrash.h
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
//
// TLCrash.h
// Pods
//
// Created by Tangjiling on 2020/5/15.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
//日志打印
#define NSLog(...)
#define PKLog(frmt,...) [Log logWithLine:__LINE__ method:[NSString stringWithFormat:@"%s", __FUNCTION__] time:[NSDate date] format:[NSString stringWithFormat:frmt, ## __VA_ARGS__]]
@interface TLCrash : NSObject
/// 初始化Crash 记录闪退问题
+(void)collectCrash;
+(NSUncaughtExceptionHandler *)getHandler;
+(void)takeException:(NSException *)exception;
+ (void)setFileLogOnOrOff:(BOOL)on;
+ (void)logWithLine:(NSUInteger)line
method:(NSString *)methodName
time:(NSDate *)timeStr
format:(NSString *)format;
/// 日志开关
/// @param on 是否开始记录日志信息
+ (void)setFileLogOnOrOff:(BOOL)on;
@end
NS_ASSUME_NONNULL_END