1 #include "ace/Log_Msg.h"
2 #include "ace/streams.h"
4 int ACE_TMAIN (int, ACE_TCHAR
*argv
[])
6 // Output to default destination (stderr)
7 ACE_LOG_MSG
->open (argv
[0]);
11 ACE_OSTREAM_TYPE
*output
=
12 (ACE_OSTREAM_TYPE
*) new ofstream ("ostream.output.test");
14 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("%IThis will go to STDERR\n")));
17 (argv
[0], ACE_Log_Msg::SYSLOG
, ACE_TEXT ("syslogTest"));
18 ACE_LOG_MSG
->set_flags (ACE_Log_Msg::STDERR
);
20 ((LM_DEBUG
, ACE_TEXT ("%IThis goes to STDERR & syslog\n")));
22 ACE_LOG_MSG
->msg_ostream (output
, 0);
23 ACE_LOG_MSG
->set_flags (ACE_Log_Msg::OSTREAM
);
25 ACE_TEXT ("%IThis will go to STDERR, ")
26 ACE_TEXT ("syslog & an ostream\n")));
28 ACE_LOG_MSG
->clr_flags (ACE_Log_Msg::OSTREAM
);