Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- release
- UIView
- Undefined symbols for architecture armv7s
- Derived Data
- Default-568h.png
- NSHomeDirectory
- .svn
- Debug
- landscape
- SBTarget
- xib
- scale
- ccbi
- box2d
- storyboard
- 멀티태스킹
- LLVM
- CCLOG
- Xcode
- 태그를 입력해 주세요.
- cocos2d-x
- /var/mobile/Applications
Archives
- Today
- Total
standwally
DEBUG모드에서만 로그출력하기 본문
아래 소스코드를 .pch파일에 추가해준 다음에,
프로젝트 셋팅에서 -D_DEBUG_LOG를 추가해준다.
// for DEBUGGING Log option, Add "-D_DEBUG_LOG" in "Debug Build Settings => Apple LLVM compiler 4.x - Language => Other C Flags" // in Release settings, just DO NOT USE "-D_DEBUG_LOG" then all "NSLog()" will be ignored ! #ifdef _DEBUG_LOG #define NSLog(fmt, ...) NSLog((@"%s[Line: %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else #define NSLog(...) #endif