Created
June 6, 2014 12:09
-
-
Save tyama/4a9585033727d2b53b1f to your computer and use it in GitHub Desktop.
log macro
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 LOG(...) NSLog(__VA_ARGS__) | |
# define LOG_CURRENT_METHOD NSLog(@"%@/%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)) | |
# define LogPoint(p) LOG(@"%s:%@",#p,NSStringFromCGPoint(p)) | |
# define LogRect(r) LOG(@"%s:%@",#r,NSStringFromCGRect(r)) | |
# define LogSize(s) LOG(@"%s:%@",#s,NSStringFromCGSize(s)) | |
#else | |
# define LOG(...) ; | |
# define LOG_CURRENT_METHOD ; | |
# define LogPoint(p) ; | |
# define LogRect(p) ; | |
# define LogSize(p) ; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment