Created
May 15, 2015 12:18
-
-
Save arslanbilal/c4652e0e5e7fb8fddfcb to your computer and use it in GitHub Desktop.
Objective-C Log Handling
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
#import <Foundation/Foundation.h> | |
#if DEBUG == 0 | |
#define DebugLog(...) | |
#elif DEBUG == 1 | |
#define DebugLog(...) NSLog(__VA_ARGS__) | |
#endif | |
int main() | |
{ | |
DebugLog(@"Debug log, our custom addition gets \ | |
printed during debug only"); | |
NSLog(@"NSLog gets printed always" ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment