summaryrefslogtreecommitdiff
path: root/netsvcs
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-01-28 15:55:16 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-01-28 15:55:16 +0000
commit4f7eb1c5530ce4cabc00221acb0c33c4e235141d (patch)
treed6d93e418809ec72ecf49e2f6450c290d1b66aaf /netsvcs
parent6e52c735dba01c66fe8da87303d51367f3a00ce5 (diff)
downloadATCD-4f7eb1c5530ce4cabc00221acb0c33c4e235141d.tar.gz
ChangeLogTag:Sun Jan 28 08:32:07 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'netsvcs')
-rw-r--r--netsvcs/lib/Client_Logging_Handler.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp
index a2d96d2f2d0..43cc54b5b01 100644
--- a/netsvcs/lib/Client_Logging_Handler.cpp
+++ b/netsvcs/lib/Client_Logging_Handler.cpp
@@ -285,6 +285,16 @@ ACE_Client_Logging_Handler::handle_output (ACE_HANDLE)
int
ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
{
+ ostream *orig_ostream = ACE_Log_Msg::instance ()->msg_ostream ();
+
+ // This logic must occur before we do the encode() on <log_record>
+ // since otherwise the values of the <log_record> fields will be in
+ // network byte order.
+ if (orig_ostream)
+ log_record.print ("<localhost>",
+ ACE_Log_Msg::instance ()->flags (),
+ *orig_ostream);
+
if (this->logging_output_ == ACE_STDERR)
log_record.print ("<localhost>",
ACE_Log_Msg::instance ()->flags (),
@@ -307,12 +317,6 @@ ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
this->logging_output_ = ACE_STDERR;
}
- ostream *orig_ostream = ACE_Log_Msg::instance ()->msg_ostream ();
-
- if (orig_ostream)
- log_record.print ("<localhost>",
- ACE_Log_Msg::instance ()->flags (),
- *orig_ostream);
return 0;
}