Skip to content

Instantly share code, notes, and snippets.

@jesusdomin
Created September 17, 2014 06:51
Show Gist options
  • Save jesusdomin/7bd3066a715f7bfc0820 to your computer and use it in GitHub Desktop.
Save jesusdomin/7bd3066a715f7bfc0820 to your computer and use it in GitHub Desktop.
LogUtil
/*
* LogUtil.h
*/
// Comment for hide
#define LOG_INFO
#define LOG_ERROR
#define LOG_DEBUG
//#define LOG_FINE_DEBUG
#ifdef LOG_INFO
# define ILog(fmt, ...) NSLog((@"INFO%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define ILog(...)
#endif
#ifdef LOG_ERROR
# define ELog(fmt, ...) NSLog((@"ERROR%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define ELog(...)
#endif
#ifdef LOG_DEBUG
# define DLog(fmt, ...) NSLog((@"DEBUG%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
#ifdef LOG_FINE_DEBUG
# define FLog(fmt, ...) NSLog((@"FINE%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define FLog(...)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment