Monday 9 November 2015

Dlog

//
// 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

No comments:

Post a Comment