NSLog replacement
copied from http://iphoneincubator.com/blog/debugging/the-evolution-of-a-replacement-for-nslog
basically just put these code into your precompiled header file:
// DLog is almost a drop-in replacement for NSLog // DLog(); // DLog(@"here"); // DLog(@"value: %d", x); // Unfortunately this doesn't work DLog(aStringVariable); you have to do this instead DLog(@"%@", aStringVariable); #ifdef DEBUG # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else # define DLog(...) #endif // ALog always displays output regardless of the DEBUG setting #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
you might need to add this flags to the project:
OTHER_CFLAGS = -DDEBUG
GCC_PREFIX_HEADER = YourProject_Prefix.pch # this is needed especially for static library