Skip to content

Instantly share code, notes, and snippets.

@doskoi
Created April 29, 2011 05:37
Show Gist options
  • Save doskoi/947899 to your computer and use it in GitHub Desktop.
Save doskoi/947899 to your computer and use it in GitHub Desktop.
DLog
#ifdef DEBUG
#define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
#define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__]
#else
#define DLog(...) do { } while (0)
#define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment