summaryrefslogtreecommitdiff
path: root/cpp/src/tests/logging.cpp
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2012-03-09 20:02:33 +0000
committerCharles E. Rolke <chug@apache.org>2012-03-09 20:02:33 +0000
commit5a2f5a5d91d9d1bad78054291dbf5f610d77cfc5 (patch)
tree416f37ae14875ceb64e8c237c4cf84c80cb7df14 /cpp/src/tests/logging.cpp
parentb2e68834d375673f4280241ef17d2c79876acd8b (diff)
downloadqpid-python-5a2f5a5d91d9d1bad78054291dbf5f610d77cfc5.tar.gz
QPID-3891 C++ Broker --log-function is too chatty.
Print only class-qualified function names and no args. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1299015 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/logging.cpp')
-rw-r--r--cpp/src/tests/logging.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/tests/logging.cpp b/cpp/src/tests/logging.cpp
index fc55d642c3..dcecf0b54c 100644
--- a/cpp/src/tests/logging.cpp
+++ b/cpp/src/tests/logging.cpp
@@ -29,6 +29,7 @@
#endif
#include <boost/test/floating_point_comparison.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#include <boost/format.hpp>
#include "unit_test.h"
@@ -176,7 +177,9 @@ QPID_AUTO_TEST_CASE(testLoggerFormat) {
l.format(Logger::FUNCTION);
QPID_LOG(critical, "foo");
- BOOST_CHECK_EQUAL(string(BOOST_CURRENT_FUNCTION) + ": foo\n", out->last());
+ BOOST_CHECK( ends_with( out->last(), ": foo\n"));
+ string name = out->last().substr(0, out->last().length() - 6);
+ BOOST_CHECK( contains( string(BOOST_CURRENT_FUNCTION), name));
l.format(Logger::LEVEL);
QPID_LOG(critical, "foo");