CocoaLumberjack.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Software License Agreement (BSD License)
  2. //
  3. // Copyright (c) 2010-2019, 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 DDLogLevel ddLogLevel = DDLogLevelVerbose;
  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 DDLogLevel myLibLogLevel = DDLogLevelVerbose;
  49. *
  50. * Step 3:
  51. * Replace your NSLog statements with DDLog statements according to the severity of the message.
  52. *
  53. * NSLog(@"Fatal error, no dohickey found!"); -> DDLogError(@"Fatal error, no dohickey found!");
  54. *
  55. * DDLog 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. //! Project version number for CocoaLumberjack.
  60. FOUNDATION_EXPORT double CocoaLumberjackVersionNumber;
  61. //! Project version string for CocoaLumberjack.
  62. FOUNDATION_EXPORT const unsigned char CocoaLumberjackVersionString[];
  63. // Disable legacy macros
  64. #ifndef DD_LEGACY_MACROS
  65. #define DD_LEGACY_MACROS 0
  66. #endif
  67. // Core
  68. #import <CocoaLumberjack/DDLog.h>
  69. // Main macros
  70. #import <CocoaLumberjack/DDLogMacros.h>
  71. #import <CocoaLumberjack/DDAssertMacros.h>
  72. // Capture ASL
  73. #import <CocoaLumberjack/DDASLLogCapture.h>
  74. // Loggers
  75. #import <CocoaLumberjack/DDLoggerNames.h>
  76. #import <CocoaLumberjack/DDTTYLogger.h>
  77. #import <CocoaLumberjack/DDASLLogger.h>
  78. #import <CocoaLumberjack/DDFileLogger.h>
  79. #import <CocoaLumberjack/DDOSLogger.h>
  80. // Extensions
  81. #import <CocoaLumberjack/DDContextFilterLogFormatter.h>
  82. #import <CocoaLumberjack/DDDispatchQueueLogFormatter.h>
  83. #import <CocoaLumberjack/DDMultiFormatter.h>
  84. #import <CocoaLumberjack/DDFileLogger+Buffering.h>
  85. // CLI
  86. #import <CocoaLumberjack/CLIColor.h>
  87. // etc
  88. #import <CocoaLumberjack/DDAbstractDatabaseLogger.h>
  89. #import <CocoaLumberjack/DDLog+LOGV.h>
  90. #import <CocoaLumberjack/DDLegacyMacros.h>