diff options
| author | Alan Conway <aconway@apache.org> | 2009-01-05 22:01:15 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-01-05 22:01:15 +0000 |
| commit | 56491d620110dcb0f64c6641cfa30a8ab3c80971 (patch) | |
| tree | d4d146a4c7169f678d067de4dae642b21fab47e6 /qpid/cpp/src/tests/BrokerFixture.h | |
| parent | d64879c9700c17068effe7db2382367030786192 (diff) | |
| download | qpid-python-56491d620110dcb0f64c6641cfa30a8ab3c80971.tar.gz | |
Minor logging fixes.
cpp/src/tests/BrokerFixture.h: make tests quiet, log with error+
qpid/broker/Daemon.cpp: print to stderr in parent process if child fails.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@731739 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/BrokerFixture.h')
| -rw-r--r-- | qpid/cpp/src/tests/BrokerFixture.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/BrokerFixture.h b/qpid/cpp/src/tests/BrokerFixture.h index b3e68fdc41..2a4faa2fd4 100644 --- a/qpid/cpp/src/tests/BrokerFixture.h +++ b/qpid/cpp/src/tests/BrokerFixture.h @@ -23,12 +23,15 @@ */ #include "SocketProxy.h" -#include "qpid/sys/Thread.h" + #include "qpid/broker/Broker.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" +#include "qpid/log/Logger.h" +#include "qpid/log/Options.h" +#include "qpid/sys/Thread.h" #include <boost/noncopyable.hpp> /** @@ -42,6 +45,13 @@ struct BrokerFixture : private boost::noncopyable { qpid::sys::Thread brokerThread; BrokerFixture(Broker::Options opts=Broker::Options()) { + // Keep the tests quiet unless logging env. vars have been set by user. + if (!::getenv("QPID_LOG_ENABLE") && !::getenv("QPID_TRACE")) { + qpid::log::Options logOpts; + logOpts.selectors.clear(); + logOpts.selectors.push_back("error+"); + qpid::log::Logger::instance().configure(logOpts); + } opts.port=0; // Management doesn't play well with multiple in-process brokers. opts.enableMgmt=false; |
