c++
undef 활용, log message 출력
easy16
2019. 10. 2. 16:41
다른 log message는 disable 시킨 상태에서, 아래와 같이 선언하면
해당 파일 내의 로그만 출력이 가능.
#ifdef DHD_TRACE
#undef DHD_TRACE
#define DHD_TRACE(X) printf X
#else
#define DHD_TRACE(X) printf X
#endif
#ifdef DHD_ERROR
#undef DHD_ERROR
#define DHD_ERROR(X) printf X
#else
#define DHD_ERROR(X) printf X
#endif