Skip to content

Instantly share code, notes, and snippets.

@Hokila
Created May 29, 2014 09:10
Show Gist options
  • Save Hokila/2780319b9504d0b371ef to your computer and use it in GitHub Desktop.
Save Hokila/2780319b9504d0b371ef to your computer and use it in GitHub Desktop.
#define DEBUG_TRACE_LEVEL 4
#ifdef DEBUG
#if (DEBUG_TRACE_LEVEL == 0)
#define HOLog(log,...) NSLog((@"[File %s] [Function %s] [Line %d]\n" log), __FILE__,__PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#elif (DEBUG_TRACE_LEVEL == 1)
#define HOLog(log,...) NSLog((@"\n[Function %s] [Line %d]\n" log), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#elif (DEBUG_TRACE_LEVEL == 2)
#define HOLog(log,...) NSLog((@"%s\n" log), __PRETTY_FUNCTION__, ##__VA_ARGS__)
#else
#define HOLog(log,...) NSLog(log, ##__VA_ARGS__)
#endif
#else
#define HOLog(...) //nothing output for distribution
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment