Skip to content

Instantly share code, notes, and snippets.

@loghound
loghound / DLog
Created August 27, 2010 07:05
DLog
// Place this in precompile header and in place of NSLog use DLog
// When building in anything other than Debug nothing is logged
// This also provides more logging (so, the NSLog arguments, the method name and the line in code it was called on
// I can't remember where I found this online, but I claim no copyright on this :)
// ALog should be used to log things, regardless of the Build phase
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else