Last active
August 29, 2015 13:56
-
-
Save neiraza/8947832 to your computer and use it in GitHub Desktop.
NSLogをDEBUG時しか使わせない
This file contains hidden or 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_PRINTF(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); | |
#define LOG_FUNC NSLog(@"%s", __func__) | |
#define LOG_METHOD_AND_ABORT LOG_METHOD; abort() | |
#else | |
#define LOG(...) | |
#define LOG_PRINTF(FORMAT, ...) | |
#define LOG_FUNC | |
#define LOG_METHOD_AND_ABORT | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment