summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-04-27 21:30:45 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-04-27 21:30:45 +0000
commitb2ae774c1bdc8935ec57ba45f4267f625cbcc00f (patch)
tree25bc22263b9073ff19fa0650eda3bb9ed11815e7
parentc28ddf85ba6b7fd7601d0f2c548aed0bdd27d2bc (diff)
downloadATCD-b2ae774c1bdc8935ec57ba45f4267f625cbcc00f.tar.gz
ChangeLogTag: Wed Apr 27 14:29:03 2005 J.T. Conklin <jtc@acorntoolworks.com>
-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;