#define NSLog(s,...)
this is what I use to disable logging. so I can think of a solution like this:
#ifdef NDEBUG #define NSLog(s,...) #endif
somewhere in Prefix.pch or in global includes file (not sure if DEBUG works for libs though).
edit: of course above solution overrides SDK function, which we may want to avoid. IMO something like this would be a better solution:
#ifdef DEBUG #define AGLog NSLog #else #define AGLog(...) #endif
then use AGLog alias for logging.
#define NSLog(s,...)
this is what I use to disable logging. so I can think of a solution like this:
#ifdef NDEBUG
#define NSLog(s,...)
#endif
somewhere in Prefix.pch or in global includes file (not sure if DEBUG works for libs though).
edit: of course above solution overrides SDK function, which we may want to avoid. IMO something like this would be a better solution:
#ifdef DEBUG
#define AGLog NSLog
#else
#define AGLog(...)
#endif
then use AGLog alias for logging.