Skip to content

Instantly share code, notes, and snippets.

@dystonie
Created August 20, 2012 12:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dystonie/3403730 to your computer and use it in GitHub Desktop.
Save dystonie/3403730 to your computer and use it in GitHub Desktop.
DEBUG_LOG()
#import <stdio.h>
#import <stdarg.h>
int globalLevel = 50;
#define DEBUG_LOG(logLevel, format, ...) \
do { \
if ((logLevel) > globalLevel) printf((format), ##__VA_ARGS__); \
} while (0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment