Skip to content

Instantly share code, notes, and snippets.

@bouchtaoui-dev
Last active December 2, 2017 18:51
Show Gist options
  • Select an option

  • Save bouchtaoui-dev/7ff94970291e32ae4ef56ea11397a7db to your computer and use it in GitHub Desktop.

Select an option

Save bouchtaoui-dev/7ff94970291e32ae4ef56ea11397a7db to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#if DEBUG == 0
#define DBLog(...)
#elif DEBUG == 1
#define DBLog(...) NSLog(__VA_ARGS__)
#endif
int main()
{
DBLog(@"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