1.代码
#define ACE_NTRACE 0
#include <iostream>
#include <ace/Log_Msg.h>#define DEBUG_PREFIX ACE_TEXT ("DEBUG%I")
#define MYDEBUG(FMT, ...) \
ACE_DEBUG( (LM_DEBUG, \
DEBUG_PREFIX FMT \
__VA_ARGS__))int main(int argc, char* argv[])
{
ACE_TRACE("main");
MYDEBUG( ACE_TEXT("Good night\n"));
return 0;
}
2. 结果
(3073735232) calling main in file `de.cpp' on line 14
DEBUG Goodnight
(3073735232) leaving main
tips: 要想%I生效必须把高亮加上否则不生效