2
0

Fix mpw_log override for iOS/macOS.

This commit is contained in:
Maarten Billemont 2018-03-24 16:49:23 -04:00
parent 6650382e19
commit 8a4af69008

View File

@ -49,7 +49,7 @@
#import <objc/NSObjCRuntime.h>
#import <stdlib.h>
#define log(level, format, ...) \
#define mpw_log(level, format, ...) \
do { \
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
char *_msg = NULL; \
@ -64,11 +64,11 @@
CFRelease( msgStr ); \
} while (0)
#define trc(format, ...) log( 0, format, ##__VA_ARGS__ );
#define dbg(format, ...) log( 1, format, ##__VA_ARGS__ );
#define inf(format, ...) log( 2, format, ##__VA_ARGS__ );
#define wrn(format, ...) log( 3, format, ##__VA_ARGS__ );
#define err(format, ...) log( 4, format, ##__VA_ARGS__ );
#define ftl(format, ...) log( 5, format, ##__VA_ARGS__ );
#define trc(format, ...) mpw_log( 0, format, ##__VA_ARGS__ );
#define dbg(format, ...) mpw_log( 1, format, ##__VA_ARGS__ );
#define inf(format, ...) mpw_log( 2, format, ##__VA_ARGS__ );
#define wrn(format, ...) mpw_log( 3, format, ##__VA_ARGS__ );
#define err(format, ...) mpw_log( 4, format, ##__VA_ARGS__ );
#define ftl(format, ...) mpw_log( 5, format, ##__VA_ARGS__ );
#endif