Skip to content

Instantly share code, notes, and snippets.

@sbrocket
Created September 6, 2009 16:31
Show Gist options
  • Select an option

  • Save sbrocket/181862 to your computer and use it in GitHub Desktop.

Select an option

Save sbrocket/181862 to your computer and use it in GitHub Desktop.
#ifdef DEBUG
#define debugLog(fmt, ...) NSLog(fmt, ##__VA_ARGS__)
#define debugLogPretty(fmt, ...) NSLog(@"%s (%@:%d)\n%@", \
__PRETTY_FUNCTION__, \
[[NSString stringWithUTF8String:__FILE__] lastPathComponent], \
__LINE__, \
[NSString stringWithFormat:(fmt), ##__VA_ARGS__])
#else
#define debugLog(fmt, ...)
#define debugLogPretty(fmt, ...)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment