summaryrefslogtreecommitdiff
path: root/netsvcs/lib
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2000-06-29 00:38:22 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2000-06-29 00:38:22 +0000
commit757b36df53fc60bdd9cbd680daf50d2b349f05c9 (patch)
tree08f8547bba095a4460ce58ecc23215370ebe9d7f /netsvcs/lib
parent410add0e54088ad2fea252551a89de485ada55c8 (diff)
downloadATCD-757b36df53fc60bdd9cbd680daf50d2b349f05c9.tar.gz
ChangeLogTag:Wed Jun 28 19:35:23 2000 Jerry D. De Master <jdemaste@rite-solutions.com>
Diffstat (limited to 'netsvcs/lib')
-rw-r--r--netsvcs/lib/Client_Logging_Handler.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp
index 0b7b95895f1..0c07357a1c3 100644
--- a/netsvcs/lib/Client_Logging_Handler.cpp
+++ b/netsvcs/lib/Client_Logging_Handler.cpp
@@ -290,13 +290,14 @@ ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
if (ACE::send (this->logging_output_,
(char *) &log_record,
len) == -1)
- // Switch over to logging to stderr for now. At some point,
- // we'll improve the implementation to queue up the message,
- // try to reestablish a connection, and then send the queued
- // data once we've reconnect to the logging server. If you'd
- // like to implement this functionality and contribute it back
- // to ACE that would be great!
- this->logging_output_ = ACE_STDERR;
+ if (ACE_Log_Msg::instance ()->msg_ostream () == 0)
+ // Switch over to logging to stderr for now. At some point,
+ // we'll improve the implementation to queue up the message,
+ // try to reestablish a connection, and then send the queued
+ // data once we've reconnect to the logging server. If
+ // you'd like to implement this functionality and contribute
+ // it back to ACE that would be great!
+ this->logging_output_ = ACE_STDERR;
}
ostream *orig_ostream = ACE_Log_Msg::instance ()->msg_ostream ();
@@ -444,9 +445,10 @@ ACE_Client_Logging_Acceptor::init (int argc, char *argv[])
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("%p, using stderr\n"),
ACE_TEXT ("can't connect to logging server")));
- // If we can't connect to the server then we'll send the logging
- // messages to stderr.
- stream.set_handle (ACE_STDERR);
+ if (ACE_Log_Msg::instance ()->msg_ostream () == 0)
+ // If we can't connect to the server then we'll send the logging
+ // messages to stderr.
+ stream.set_handle (ACE_STDERR);
}
else
{