Skip to content

Instantly share code, notes, and snippets.

@yoterpa
Forked from spenrose/gist:4539571
Created September 25, 2015 07:16
Show Gist options
  • Save yoterpa/503b0bcfeb54c55d46ba to your computer and use it in GitHub Desktop.
Save yoterpa/503b0bcfeb54c55d46ba to your computer and use it in GitHub Desktop.
Logging macros
// Logging Macros
#ifdef DEBUG
# define DLog(FORMAT, ...) printf("%s %s ~ %s\n", [[[NSDate date] description] UTF8String], __PRETTY_FUNCTION__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
#else
# define DLog(...)
#endif
// ALog always displays output regardless of the DEBUG setting
#define ALog(FORMAT, ...) printf("%s %s ~ %s\n", [[[NSDate date] description] UTF8String], __PRETTY_FUNCTION__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment