summaryrefslogtreecommitdiff
path: root/TAO/tao/ORB_Core.cpp
diff options
context:
space:
mode:
authorljb1 <ljb1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-10-31 02:49:22 +0000
committerljb1 <ljb1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-10-31 02:49:22 +0000
commit6c65d91a137018d3baeaa10f877a0768c01277cc (patch)
treee400ffbe0828bd82e39e867542f4f5a9c1d84118 /TAO/tao/ORB_Core.cpp
parent262da4ad7a1f575c03f2e0e4b009f16d22e3b887 (diff)
downloadATCD-6c65d91a137018d3baeaa10f877a0768c01277cc.tar.gz
Sat Oct 30 21:40:48 1999 Luther J Baker <ljb1@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/ORB_Core.cpp')
-rw-r--r--TAO/tao/ORB_Core.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index ab77af6434a..8e2e1212e10 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -834,43 +834,41 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV)
else if ((current_arg = arg_shifter.get_the_parameter
("-ORBLogFile")))
{
-
- // USAGE: -ORBLogFile <filename> <a|w>
- // I actually accept anything that starts with
- // an 'a' ie: append
+ // redirect all ACE_DEUBG and ACE_ERROR output to a file
+ // USAGE: -ORBLogFile <filename>
+ // default: append
ASYS_TCHAR* file_name = current_arg;
arg_shifter.consume_arg ();
- ACE_OSTREAM_TYPE* output_stream;
+ //
+ // would rather use ACE_OSTREAM_TYPE out here..
+ // but need ACE_FSTREAM_TYPE to call ->open(...)
+ // and haven't found such a macro to rep FILE* and/or fstream*
+ //
#if defined (ACE_LACKS_IOSTREAM_TOTALLY)
- output_stream = ACE_OS::fopen (file_name, "a");
+ FILE* output_stream = ACE_OS::fopen (file_name, "a");
ACE_LOG_MSG->msg_ostream (output_stream);
#else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
- //
- // won't compile on linux ???
- //
- // output_stream->open (file_name, flags, 0660);
- //
- // forced to use constructor with file name
- //
+ ofstream* output_stream;
ACE_NEW_RETURN
(output_stream,
- ofstream(file_name, ios::out | ios::app, 0660),
+ ofstream (),
1);
//
- // note: we are allocating dynamic memory here....
- // but I assume it will stay persistent for the life
- // of the program.
+ // note: we are allocating dynamic memory here....but
+ // I assume it will persist for the life of the program
//
+ output_stream->open (file_name, ios::out | ios::app, 0660);
+
if (!output_stream->bad ())
{
ACE_LOG_MSG->msg_ostream (output_stream);