// LogTest.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "ace/ace.h"
#include "Ace/log_msg.h"
#include "ace/streams.h"
void foo();
int ACE_TMAIN(int argc, ACE_TCHAR* argv[])
{
ACE::init();
ACE_OSTREAM_TYPE* output=new std::ofstream("ostream.output.test.txt");
ACE_LOG_MSG->msg_ostream(output,0);
ACE_LOG_MSG->clr_flags(ACE_Log_Msg::STDERR);
ACE_LOG_MSG->set_flags(ACE_Log_Msg::OSTREAM);
//ACE_LOG_MSG->open(argv[0],ACE_Log_Msg::SYSLOG,ACE_TEXT("sysLogTest"));
ACE_TRACE(ACE_TEXT("main"));
// ACE_LOG_MSG->priority_mask(LM_DEBUG|LM_NOTICE,ACE_Log_Msg::PROCESS);
ACE_DEBUG((LM_INFO,ACE_TEXT("%IHi Mom\n")));
foo();
ACE_LOG_MSG->clr_flags(ACE_Log_Msg::OSTREAM);
delete output;
ACE::fini();
return 0;
}
void foo()
{
ACE_TRACE(ACE_TEXT("foo"));
}