 <pre><code>#ifndef Debug #define Debug 1 #endif #if Debug # define DebugLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else # define DebugLog(...) #endif </code></pre> <p>Set Debug to 1 for enabling the log and 0 for disabling it.</p>