Last active
December 27, 2015 00:39
-
-
Save christianroman/7238676 to your computer and use it in GitHub Desktop.
Personal use debugging macros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef DEBUG | |
#define DLog(...) NSLog(__VA_ARGS__) | |
#else | |
#define DLog(...) /* */ | |
#endif | |
#define ALog(...) NSLog(__VA_ARGS__) | |
#ifdef DEBUG | |
#define DLog(format, ...) NSLog((@"%s [Line %d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#define DErr(format, ...) NSLog((@"[ERROR] %s [Line %d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#define DLogRect(rect, ...) DLog(@"%s: %@", #rect, NSStringFromCGRect(rect)) | |
#define DLogSize(size, ...) DLog(@"%s: %@", #size, NSStringFromCGSize(size)) | |
#else | |
#define DLog(format, ...) | |
#define DErr(format, ...) | |
#define DLogRect(rect, ...) | |
#define DLogSize(size, ...) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment