Go to your Build settings and under the Debug configuration add a value to "Preprocessor Macros" value like: DEBUG_MODE=1
Make sure you only do this for the Debug configuration and not for Beta or Release versions.
Use This:-
#ifdef DEBUG_MODE
#define DLog( s, ... ) NSLog( @"<%@:(%d)> %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DLog( s, ... )
#endif
NSLog--->DLog(Debugging mode)
DLog--->NSLog(Realse Mode AutoMatically).
No comments:
Post a Comment