Last active
December 11, 2015 03:48
-
-
Save divanvisagie/4540622 to your computer and use it in GitHub Desktop.
I have noticed a lot of people seem to go to very unnecessary lengths to strip NSlogs (see Insane.mm) , where all thats required is something simple. Rule of Clarity: Clarity is better than cleverness - https://en.wikipedia.org/wiki/Unix_philosophy
This file contains 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
/* who would do this ? , its insane */ | |
#ifdef DEBUG | |
#define DMLog(...) NSLog(@"%s%@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) | |
#else | |
#define DMLog(...) do { } while (0) | |
#endif |
This file contains 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
/* Keep it simple */ | |
#ifndef DEBUG | |
#define NSLog(...) {} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment