HMDBULog.h
1.37 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
49
//
// HMDBULog.h
// HeimdallrBU
//
// Created by 谢俊逸 on 14/3/2018.
//
#import <Foundation/Foundation.h>
#define WatchDogIdentifier @"Heimdallr_WatchDog_Log"
#define OOMIdentifier @"Heimdallr_OOM_Log"
#define CrashIdentifier @"Heimdallr_Crash_Log"
#define ANRIdentifier @"Heimdallr_ANR_Log"
#define ExceptionIdentifier @"Heimdallr_Exception_Log"
#define ExceptionProtectIdentifier @"Heimdallr_ExceptionProtect_Log"
#define UserExceptionIdentifier @"Heimdallr_UserException_Log"
#define NetworkErrorIdentifier @"Heimdallr_Network_Log"
/// format 格式
#if defined(__LP64__)
#define FMT_LONG_DIGITS "16"
#define FMT_RJ_SPACES "18"
#else
#define FMT_LONG_DIGITS "8"
#define FMT_RJ_SPACES "10"
#endif
#define FMT_PTR_SHORT @"0x%" PRIxPTR
#define FMT_PTR_LONG @"0x%0" FMT_LONG_DIGITS PRIxPTR
#define FMT_PTR_RJ @"%#" FMT_RJ_SPACES PRIxPTR
#define FMT_OFFSET @"%" PRIuPTR
#define FMT_TRACE_PREAMBLE @"%-4d%-31s " FMT_PTR_LONG
#define FMT_TRACE_UNSYMBOLICATED FMT_PTR_SHORT @" + " FMT_OFFSET
#define FMT_TRACE_SYMBOLICATED @"%@ + " FMT_OFFSET
#define HMDBUAppleRedactedText @"<redacted>"
#define kExpectedMajorVersion 3
typedef NS_ENUM(NSUInteger, HMDBULogType) {
HMDBULogWatchDog,
HMDBULogOOM,
HMDBULogANR,
HMDBULogCrash,
HMDBULogException,
HMDBULogExceptionProtect,
HMDBULogUserException,
HMDBULogNetworkError
};