XLog for Objective-C

add this code to your App-Prefix.pch

/**
 XLog a working version 
 source: http://code-reference.com
 */
 
/* remove the // to turn off Logs */
//#define RELEASE_MODE 1
 
#ifdef RELEASE_MODE
#define XLog(...)
#else
 
#define XLog(fmt, ...) NSLog(@"%s line:%d " fmt, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#endif

output of XLog

  2013-03-23 19:45:59.098 cppApp[28436:c07] -[ViewController tableView:cellForRowAtIndexPath:] line:101 indexpath 0