Skip to content

Instantly share code, notes, and snippets.

@arslanbilal
Created May 15, 2015 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arslanbilal/c4652e0e5e7fb8fddfcb to your computer and use it in GitHub Desktop.
Save arslanbilal/c4652e0e5e7fb8fddfcb to your computer and use it in GitHub Desktop.
Objective-C Log Handling
#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