Skip to content

Instantly share code, notes, and snippets.

@haric
Created August 3, 2012 14:34
Show Gist options
  • Select an option

  • Save haric/3248172 to your computer and use it in GitHub Desktop.

Select an option

Save haric/3248172 to your computer and use it in GitHub Desktop.
Debug-only logging
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
// ALog always displays output regardless of the DEBUG setting
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment