HMDBULog.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // HMDBULog.h
  3. // HeimdallrBU
  4. //
  5. // Created by 谢俊逸 on 14/3/2018.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #define WatchDogIdentifier @"Heimdallr_WatchDog_Log"
  9. #define OOMIdentifier @"Heimdallr_OOM_Log"
  10. #define CrashIdentifier @"Heimdallr_Crash_Log"
  11. #define ANRIdentifier @"Heimdallr_ANR_Log"
  12. #define ExceptionIdentifier @"Heimdallr_Exception_Log"
  13. #define ExceptionProtectIdentifier @"Heimdallr_ExceptionProtect_Log"
  14. #define UserExceptionIdentifier @"Heimdallr_UserException_Log"
  15. #define NetworkErrorIdentifier @"Heimdallr_Network_Log"
  16. /// format 格式
  17. #if defined(__LP64__)
  18. #define FMT_LONG_DIGITS "16"
  19. #define FMT_RJ_SPACES "18"
  20. #else
  21. #define FMT_LONG_DIGITS "8"
  22. #define FMT_RJ_SPACES "10"
  23. #endif
  24. #define FMT_PTR_SHORT @"0x%" PRIxPTR
  25. #define FMT_PTR_LONG @"0x%0" FMT_LONG_DIGITS PRIxPTR
  26. #define FMT_PTR_RJ @"%#" FMT_RJ_SPACES PRIxPTR
  27. #define FMT_OFFSET @"%" PRIuPTR
  28. #define FMT_TRACE_PREAMBLE @"%-4d%-31s " FMT_PTR_LONG
  29. #define FMT_TRACE_UNSYMBOLICATED FMT_PTR_SHORT @" + " FMT_OFFSET
  30. #define FMT_TRACE_SYMBOLICATED @"%@ + " FMT_OFFSET
  31. #define HMDBUAppleRedactedText @"<redacted>"
  32. #define kExpectedMajorVersion 3
  33. typedef NS_ENUM(NSUInteger, HMDBULogType) {
  34. HMDBULogWatchDog,
  35. HMDBULogOOM,
  36. HMDBULogANR,
  37. HMDBULogCrash,
  38. HMDBULogException,
  39. HMDBULogExceptionProtect,
  40. HMDBULogUserException,
  41. HMDBULogNetworkError
  42. };