Yes. Therefore, I define this in my pch file.
#ifdef DEBUG # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else # define DLog(...) #endif
Instead of using NSLog, I use DLog and ALog.
(Note or copyright: I got this code long ago from some other SO message that I don't remember. Inserting it again from my snippet library)
source share