Skip to content

Instantly share code, notes, and snippets.

@fannheyward
Created October 29, 2011 09:08
Show Gist options
  • Save fannheyward/1324261 to your computer and use it in GitHub Desktop.
Save fannheyward/1324261 to your computer and use it in GitHub Desktop.
// DLog is almost a drop-in replacement for NSLog
// DLog();
// DLog(@"here");
// DLog(@"value: %d", x);
// Unfortunately this doesn't work DLog(aStringVariable); you have to do this instead DLog(@"%@", aStringVariable);
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment