Created
January 3, 2011 02:12
-
-
Save stith/763037 to your computer and use it in GitHub Desktop.
MSLog code
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
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// Debug | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
#define DEBUG_ON // Toggle to DEBUG_OFF or comment out to hide all debug code | |
#ifdef DEBUG_ON | |
#define MSLog(format, ...) CFShow([[NSString stringWithFormat:@"<%@:%d> ",[[NSString stringWithUTF8String:__FILE__] lastPathComponent],__LINE__] stringByAppendingFormat:format, ## __VA_ARGS__]) | |
#else | |
#define MSlog(format, ...) | |
#endif | |
#define MSLogRect(rect) MSLog(@"%s x:%.4f, y:%.4f, w:%.4f, h%.4f", #rect, rect.origin.x, rect.origin.y, rect.size.width, rect.size.height) | |
#define MSLogSize(size) MSLog(@"%s w:%.4f, h:%.4f", #size, size.width, size.height) | |
#define MSLogPoint(point) MSLog(@"%s x:%.4f, y:%.4f", #point, point.x, point.y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment