using iphone sdk 4.0 I want to remove the function name from this macro, but I'm struggling
#define LOG(fmt, ...) NSLog((@"%s " fmt), __PRETTY_FUNCTION__,##__VA_ARGS__)
I tried
#define LOG(fmt, ...) NSLog((@"%s " fmt), ##__VA_ARGS__)
but it crashes!
I want to be able to register as follows
LOG("text to log"); LOG("text to log with param %d", param); etc
source share