summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--ace/Log_Msg.cpp5
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 25538a5f575..7906c296347 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Apr 27 14:29:03 2005 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * ace/Log_Msg.cpp (ACE_Log_Msg::log_hexdump):
+
+ Check log priority before allocating message buffer and
+ formatting message, an unnecessary expense if the message isn't
+ going to be output. Thanks to < joez at datawire dot net > for
+ reporting this problem.
+
Wed Apr 27 20:25:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* examples/Reactor/Misc/pingpong.cpp:
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index a0a0e846cfd..885a51be8c6 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -2182,6 +2182,11 @@ ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority,
size_t size,
const ACE_TCHAR *text)
{
+ // Only print the message if <priority_mask_> hasn't been reset to
+ // exclude this logging priority.
+ if (this->log_priority_enabled (log_priority) == 0)
+ return 0;
+
ACE_TCHAR buf[ACE_Log_Record::MAXLOGMSGLEN -
ACE_Log_Record::VERBOSE_LEN - 58];
// 58 for the HEXDUMP header;