iOS 앱 개발 :: APP DEVELOPMENT/Objective C
No matching function for call to 'NSLog'
ZO
2012. 1. 9. 10:26
반응형
iOS Xcode NSLog Debugging
디버깅 시 NSLog가 위치해 있는 클래스명, 함수명, 라인넘버 출력
디버깅 시 NSLog가 위치해 있는 파일명, 라인넘버, 로그내용 출력
디버깅 시 NSLog가 위치해 있는 클래스명, 함수명, 라인넘버 출력
#ifdef DEBUG
#define NSLog(fmt, ...) NSLog((@"%s[Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define NSLog(...)
#endif
#define NSLog(fmt, ...) NSLog((@"%s[Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define NSLog(...)
#endif
디버깅 시 NSLog가 위치해 있는 파일명, 라인넘버, 로그내용 출력
#define NSLog( s, ... ) NSLog( @"<%@:(%d)> %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
반응형