Skip to content

Instantly share code, notes, and snippets.

View heavenlyfodder's full-sized avatar

heavenlyfodder

View GitHub Profile
@heavenlyfodder
heavenlyfodder / iOSLogMacros.m
Created October 26, 2011 16:15
Objective-C macros to aid in iOS app debug logging
// mmcneely: From http://stackoverflow.com/questions/969130/nslog-tips-and-tricks
// - DLog prints output to the console, but only if the DEBUG symbol is defined
// - ALog prints output to the console no matter what
// - ULog pops up window on the device (or simulator)
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif