Skip to content

Instantly share code, notes, and snippets.

@alanthonyc
Created January 11, 2012 02:50
Show Gist options
  • Save alanthonyc/1592691 to your computer and use it in GitHub Desktop.
Save alanthonyc/1592691 to your computer and use it in GitHub Desktop.
Debug Log Macro for iOS (pulled from zonque's code)
#ifdef ENABLE_DEBUG
#define DebugLog(format, args...) \
NSLog(@"%s, line %d: " format "\n", \
__func__, __LINE__, ## args);
#else
#define DebugLog(format, args...) do {} while(0)
#endif
// sample use
DebugLog("number: %d ; class %p", count, className);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment