Skip to content

Instantly share code, notes, and snippets.

@markrickert
Created June 24, 2012 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markrickert/2980812 to your computer and use it in GitHub Desktop.
Save markrickert/2980812 to your computer and use it in GitHub Desktop.
dlog
// 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