summaryrefslogtreecommitdiff
path: root/examples/Log_Msg/test_ostream.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-06-18 18:53:27 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-06-18 18:53:27 +0000
commit152c0f5c127eac99b5c9097aa4db2b34e14e6dd0 (patch)
tree0d399a92623e98588cd34e4fe0c2cf7fed880173 /examples/Log_Msg/test_ostream.cpp
parent7e7f4a5d3e77a42e648b7dd2e1b9cf23a3780955 (diff)
downloadATCD-MyACE.tar.gz
This commit was manufactured by cvs2svn to create branch 'MyACE'.MyACE
Diffstat (limited to 'examples/Log_Msg/test_ostream.cpp')
-rw-r--r--examples/Log_Msg/test_ostream.cpp74
1 files changed, 0 insertions, 74 deletions
diff --git a/examples/Log_Msg/test_ostream.cpp b/examples/Log_Msg/test_ostream.cpp
deleted file mode 100644
index 6f4dbd0770b..00000000000
--- a/examples/Log_Msg/test_ostream.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// examples/Log_Msg
-//
-// = FILENAME
-// test_ostream.cpp
-//
-// = DESCRIPTION
-// This program tests the Log_Msg abstraction wrt writing to
-// stderr and to a file.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#include "ace/OS_main.h"
-
-// FUZZ: disable check_for_streams_include
-#include "ace/streams.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(Log_Msg, test_ostream, "$Id$")
-
-int
-ACE_TMAIN (int, ACE_TCHAR *[])
-{
- // This message should show up in stderr.
- ACE_DEBUG ((LM_DEBUG,
- "first message\n"));
-
- ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR);
-
- // This message should not show up anywhere.
- ACE_DEBUG ((LM_DEBUG,
- "second message\n"));
-
- ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM);
-
- // This message should not show up anywhere since no ostream has
- // been specified.
- ACE_DEBUG ((LM_DEBUG,
- "third message\n"));
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
- // Create a persistent store.
- const char *filename = "output";
- ofstream myostream (filename, ios::out | ios::trunc);
-
- // Check for errors.
- if (myostream.bad ())
- return 1;
-
- // Set the ostream.
- ACE_LOG_MSG->msg_ostream (&myostream);
-
- // This message should show up in the ostream.
- ACE_DEBUG ((LM_DEBUG,
- "fourth message\n"));
-#endif /* ACE_LACKS_IOSTREAM_TOTALLY */
-
- ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR);
-
- // This message should show up in stderr and the ostream (without
- // ACE_LACKS_IOSTREAM_TOTALLY).
- ACE_DEBUG ((LM_DEBUG,
- "fifth message\n"));
-
- return 0;
-}