iOS打印Debug日志的方式

  1. #ifdef DEBUG    
  2.     #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);    
  3. #else    
  4.     #define DLog(...)    
  5. #endif    
  6.    
  7. #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 

  8. http://2015.iteye.com/blog/1374820
posted on 2012-04-13 15:46  easonoutlook  阅读(165)  评论(0编辑  收藏  举报