Created
March 22, 2013 19:27
-
-
Save mikekatz/5224025 to your computer and use it in GitHub Desktop.
Debugging Log macros from a PCH of a recent app. Note that it uses TFLog to log to testFlight, so this is still for in-test, not app store release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if DEBUG | |
#define AssertLog(condition, desc, args...) NSAssert(condition, desc, ## args) | |
#define DBLog(format, args...) TFLog(@"%s, line %d: " format "\n", __func__, __LINE__, ## args); | |
#else | |
#define AssertLog(c, desc, args...) if (!(c)) TFLog(@"%s, line %d: " desc "\n", __func__, __LINE__, ## args); | |
#define DBLog(format, args...) do {} while(0) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment