// 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_LOGGING define DEBUG_LOG(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); else define DEBUG_LOG(...) endifTaken from: http://iphoneincubator.com/blog/debugging/the-evolution-of-a-replacement-for-nslog
Objective C Logger
Posted by
gwyneth
on Saturday, January 22, 2011
Labels:
iPhone,
ObjectiveC
Another Objective C Code Snippet. Looking for a clean way to control your debug logging? This is a great solution.
0 comments:
Post a Comment