설명 없음

AWSCocoaLumberjack.h 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Software License Agreement (BSD License)
  2. //
  3. // Copyright (c) 2010-2016, Deusty, LLC
  4. // All rights reserved.
  5. //
  6. // Redistribution and use of this software in source and binary forms,
  7. // with or without modification, are permitted provided that the following conditions are met:
  8. //
  9. // * Redistributions of source code must retain the above copyright notice,
  10. // this list of conditions and the following disclaimer.
  11. //
  12. // * Neither the name of Deusty nor the names of its contributors may be used
  13. // to endorse or promote products derived from this software without specific
  14. // prior written permission of Deusty, LLC.
  15. /**
  16. * Welcome to CocoaLumberjack!
  17. *
  18. * The project page has a wealth of documentation if you have any questions.
  19. * https://github.com/CocoaLumberjack/CocoaLumberjack
  20. *
  21. * If you're new to the project you may wish to read "Getting Started" at:
  22. * Documentation/GettingStarted.md
  23. *
  24. * Otherwise, here is a quick refresher.
  25. * There are three steps to using the macros:
  26. *
  27. * Step 1:
  28. * Import the header in your implementation or prefix file:
  29. *
  30. * #import <CocoaLumberjack/CocoaLumberjack.h>
  31. *
  32. * Step 2:
  33. * Define your logging level in your implementation file:
  34. *
  35. * // Log levels: off, error, warn, info, verbose
  36. * static const AWSDDLogLevel ddLogLevel = AWSDDLogLevelVerbose;
  37. *
  38. * Step 2 [3rd party frameworks]:
  39. *
  40. * Define your LOG_LEVEL_DEF to a different variable/function than ddLogLevel:
  41. *
  42. * // #undef LOG_LEVEL_DEF // Undefine first only if needed
  43. * #define LOG_LEVEL_DEF myLibLogLevel
  44. *
  45. * Define your logging level in your implementation file:
  46. *
  47. * // Log levels: off, error, warn, info, verbose
  48. * static const AWSDDLogLevel myLibLogLevel = AWSDDLogLevelVerbose;
  49. *
  50. * Step 3:
  51. * Replace your NSLog statements with AWSDDLog statements according to the severity of the message.
  52. *
  53. * NSLog(@"Fatal error, no dohickey found!"); -> AWSDDLogError(@"Fatal error, no dohickey found!");
  54. *
  55. * AWSDDLog works exactly the same as NSLog.
  56. * This means you can pass it multiple variables just like NSLog.
  57. **/
  58. #import <Foundation/Foundation.h>
  59. // Disable legacy macros
  60. #ifndef AWSDD_LEGACY_MACROS
  61. #define AWSDD_LEGACY_MACROS 0
  62. #endif
  63. // Core
  64. #import "AWSDDLog.h"
  65. // Main macros
  66. #import "AWSDDLogMacros.h"
  67. #import "AWSDDAssertMacros.h"
  68. // Capture ASL
  69. #import "AWSDDASLLogCapture.h"
  70. // Loggers
  71. #import "AWSDDTTYLogger.h"
  72. #import "AWSDDASLLogger.h"
  73. #import "AWSDDFileLogger.h"
  74. #import "AWSDDOSLogger.h"
  75. // CLI
  76. #if __has_include("CLIColor.h") && TARGET_OS_OSX
  77. #import "CLIColor.h"
  78. #endif