SVGKDefine_Private.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. SVGKDefine_Private.h
  3. SVGKDefine define some common macro used for private header.
  4. */
  5. #ifndef SVGKDefine_Private_h
  6. #define SVGKDefine_Private_h
  7. #import "SVGKDefine.h"
  8. @import CocoaLumberjack;
  9. // These macro is only used inside framework project, does not expose to public header and effect user's define
  10. #define SVGKIT_LOG_CONTEXT 556
  11. #define SVGKitLogError(frmt, ...) LOG_MAYBE(NO, LOG_LEVEL_DEF, DDLogFlagError, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  12. #define SVGKitLogWarn(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagWarning, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  13. #define SVGKitLogInfo(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagInfo, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  14. #define SVGKitLogDebug(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagDebug, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  15. #define SVGKitLogVerbose(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagVerbose, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
  16. #if DEBUG
  17. static const int ddLogLevel = DDLogLevelVerbose;
  18. #else
  19. static const int ddLogLevel = DDLogLevelWarning;
  20. #endif
  21. #if SVGKIT_MAC
  22. #define NSStringFromCGRect(rect) NSStringFromRect(rect)
  23. #define NSStringFromCGSize(size) NSStringFromSize(size)
  24. #define NSStringFromCGPoint(point) NSStringFromPoint(point)
  25. #endif
  26. #endif /* SVGKDefine_Private_h */