SVGKit-Prefix.pch 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // Prefix header for all source files of the 'SVGKit-iOS' target in the 'SVGKit-iOS' project
  3. //
  4. #ifdef __OBJC__
  5. #import <Foundation/Foundation.h>
  6. #import <CocoaLumberjack/CocoaLumberjack.h>
  7. #import "SVGKDefine.h"
  8. // These macro is only used inside framework project, does not expose to public header and effect user's define
  9. #define SVGKIT_LOG_CONTEXT 556
  10. #define SVGKitLogError(frmt, ...) LOG_MAYBE(NO, LOG_LEVEL_DEF, DDLogFlagError, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  11. #define SVGKitLogWarn(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagWarning, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  12. #define SVGKitLogInfo(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagInfo, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  13. #define SVGKitLogDebug(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagDebug, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  14. #define SVGKitLogVerbose(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagVerbose, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  15. #if DEBUG
  16. static const int ddLogLevel = DDLogLevelVerbose;
  17. #else
  18. static const int ddLogLevel = DDLogLevelWarning;
  19. #endif
  20. #if SVGKIT_MAC
  21. #define NSStringFromCGRect(rect) NSStringFromRect(rect)
  22. #define NSStringFromCGSize(size) NSStringFromSize(size)
  23. #define NSStringFromCGPoint(point) NSStringFromPoint(point)
  24. #endif
  25. #endif