Created
September 11, 2013 13:00
-
-
Save avdyushin/6523246 to your computer and use it in GitHub Desktop.
Nice debug log wrapper for NSLog()
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
#define __FILE_NAME__ [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String] | |
#ifdef DEBUG | |
#define DLog( s, ... ) NSLog( @"%s:%d %s %@", \ | |
__FILE_NAME__, \ | |
__LINE__, \ | |
__PRETTY_FUNCTION__, \ | |
[NSString stringWithFormat:(s), ##__VA_ARGS__] ) | |
#else | |
#define DLog( s, ... ) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment