Created
August 29, 2011 17:49
-
-
Save cruffenach/1178932 to your computer and use it in GitHub Desktop.
Prefix Header with helpful log methods DLog and DStep
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
// | |
// Prefix header for all source files | |
// | |
#ifdef __OBJC__ | |
#endif | |
#ifndef DLog | |
#if kDebug | |
#define DLog( s, ... ) NSLog( @"\n\n************************************* DEBUG *************************************\n\t<%p %@:(%d)>\n\n\t%@\n*********************************************************************************\n\n", self, \ | |
[[NSString stringWithUTF8String:__FUNCTION__] lastPathComponent], __LINE__, \ | |
[NSString stringWithFormat:(s), ##__VA_ARGS__] ) | |
#else | |
#define DLog( s, ... ) | |
#endif | |
#endif | |
#ifndef DStep | |
#if kDebug | |
#define DStep( s, ... ) NSLog( @"\n\n************************************* DEBUG *************************************\n\t%@\n*********************************************************************************\n\n", [NSString stringWithFormat:(s), ##__VA_ARGS__]) | |
#else | |
#define DStep( s, ... ) | |
#endif | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment