iPhone Dev.
Debug 모드에서만 NSLog 로깅하기
NuBiFoRM
2013. 4. 22. 22:47
아래 화면과 같이 -DDEBUG=1 항목을 추가
프로젝트명-Prefix.pch 파일에 다음을 추가
#ifdef DEBUG
#define NSLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define NSLog( s, ... )
#endif
출처 : 아이군의 블로그
http://theeye.pe.kr/entry/upgrade-NSLog-only-working-debug-mode