aliyun-oss-react-native

OSSCocoaLumberjack.h 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. *
  20. * If you're new to the project you may wish to read "Getting Started" at:
  21. * Documentation/GettingStarted.md
  22. *
  23. * Otherwise, here is a quick refresher.
  24. * There are three steps to using the macros:
  25. *
  26. * Step 1:
  27. * Import the header in your implementation or prefix file:
  28. *
  29. * #import <CocoaLumberjack/CocoaLumberjack.h>
  30. *
  31. * Step 2:
  32. * Define your logging level in your implementation file:
  33. *
  34. * // Log levels: off, error, warn, info, verbose
  35. * static const DDLogLevel ddLogLevel = DDLogLevelVerbose;
  36. *
  37. * Step 2 [3rd party frameworks]:
  38. *
  39. * Define your LOG_LEVEL_DEF to a different variable/function than ddLogLevel:
  40. *
  41. * // #undef LOG_LEVEL_DEF // Undefine first only if needed
  42. * #define LOG_LEVEL_DEF myLibLogLevel
  43. *
  44. * Define your logging level in your implementation file:
  45. *
  46. * // Log levels: off, error, warn, info, verbose
  47. * static const DDLogLevel myLibLogLevel = DDLogLevelVerbose;
  48. *
  49. * Step 3:
  50. * Replace your NSLog statements with DDLog statements according to the severity of the message.
  51. *
  52. * NSLog(@"Fatal error, no dohickey found!"); -> OSSLogError(@"Fatal error, no dohickey found!");
  53. *
  54. * DDLog works exactly the same as NSLog.
  55. * This means you can pass it multiple variables just like NSLog.
  56. **/
  57. #import <Foundation/Foundation.h>
  58. // Disable legacy macros
  59. #ifndef OSSDD_LEGACY_MACROS
  60. #define OSSDD_LEGACY_MACROS 0
  61. #endif
  62. // Core
  63. #import "OSSDDLog.h"
  64. // Main macros
  65. #import "OSSLogMacros.h"
  66. // Loggers
  67. #import "OSSFileLogger.h"
  68. #import "OSSNSLogger.h"