Skip to content

Instantly share code, notes, and snippets.

@neiraza
Last active August 29, 2015 13:56
Show Gist options
  • Save neiraza/8947832 to your computer and use it in GitHub Desktop.
Save neiraza/8947832 to your computer and use it in GitHub Desktop.
NSLogをDEBUG時しか使わせない
#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