36 lines
1.5 KiB
Objective-C
36 lines
1.5 KiB
Objective-C
/**
|
|
SVGKDefine_Private.h
|
|
|
|
SVGKDefine define some common macro used for private header.
|
|
*/
|
|
|
|
#ifndef SVGKDefine_Private_h
|
|
#define SVGKDefine_Private_h
|
|
|
|
#import "SVGKDefine.h"
|
|
@import CocoaLumberjack;
|
|
|
|
// These macro is only used inside framework project, does not expose to public header and effect user's define
|
|
|
|
#define SVGKIT_LOG_CONTEXT 556
|
|
|
|
#define SVGKitLogError(frmt, ...) LOG_MAYBE(NO, LOG_LEVEL_DEF, DDLogFlagError, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
|
|
#define SVGKitLogWarn(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagWarning, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
|
|
#define SVGKitLogInfo(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagInfo, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
|
|
#define SVGKitLogDebug(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagDebug, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
|
|
#define SVGKitLogVerbose(frmt, ...) LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagVerbose, SVGKIT_LOG_CONTEXT, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
|
|
|
|
#if DEBUG
|
|
static const int ddLogLevel = DDLogLevelVerbose;
|
|
#else
|
|
static const int ddLogLevel = DDLogLevelWarning;
|
|
#endif
|
|
|
|
#if SVGKIT_MAC
|
|
#define NSStringFromCGRect(rect) NSStringFromRect(rect)
|
|
#define NSStringFromCGSize(size) NSStringFromSize(size)
|
|
#define NSStringFromCGPoint(point) NSStringFromPoint(point)
|
|
#endif
|
|
|
|
#endif /* SVGKDefine_Private_h */
|