-
-
Save loghound/552957 to your computer and use it in GitHub Desktop.
DLog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
#define DLog(...) | |
#endif | |
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment