From d032f5584b0f1de890844a2796d6ba158b011fca Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 27 Jun 2007 00:12:26 +0000 Subject: Make check now starts a broker on a dynamically assigned port, so multiple qpid builds on one host will not conflict. * src/tests/run_test, start_broker, kill_broker: Broker writes port to file, run_test sets QPID_PORT in environment of all tests. * src/tests/topic_publisher.cpp, topic_listener.cpp, client_test.cpp: All test clients use TestOptions to parse options from args and env. * src/qpid/Options.h: Renamed from CommonOptions.h Simplified use of Options class. * src/qpid/Url.h: Renamed defaultPort constant. * src/tests/logging.cpp: * src/tests/interop_runner.cpp: * src/tests/TestOptions.h: * src/qpidd.cpp: * src/qpid/log/Options.cpp: * src/qpid/log/Logger.cpp: * src/qpid/broker/Broker.cpp: Updated for changes to Options. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550993 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/log/Options.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'cpp/src/qpid/log/Options.cpp') diff --git a/cpp/src/qpid/log/Options.cpp b/cpp/src/qpid/log/Options.cpp index 3e117663ff..b15630ebb2 100644 --- a/cpp/src/qpid/log/Options.cpp +++ b/cpp/src/qpid/log/Options.cpp @@ -18,36 +18,34 @@ #include "Options.h" #include "Statement.h" -#include "qpid/CommonOptions.h" +#include "qpid/Options.h" namespace qpid { namespace log { using namespace std; -Options::Options() : - time(true), level(true), thread(false), source(false), function(false) +Options::Options(const std::string& name) : qpid::Options(name), + time(true), level(true), thread(false), source(false), function(false), trace(false) { outputs.push_back("stderr"); selectors.push_back("error+"); -} -void Options::addTo(po::options_description& desc) { - using namespace po; ostringstream levels; levels << LevelTraits::name(Level(0)); for (int i = 1; i < LevelTraits::COUNT; ++i) levels << " " << LevelTraits::name(Level(i)); - desc.add_options() + addOptions() + ("trace,t", optValue(trace), "Enable full debug tracing." ) ("log.enable", optValue(selectors, "RULE"), - "You can specify this option mutliple times.\n" + ("You can specify this option mutliple times.\n" "RULE is of the form 'LEVEL[+][:COMPONENT]'" - "Levels are: trace, debug, info, notice, warning, error, critical." + "Levels are: "+levels.str()+"\n" "For example:\n" "\t'--log.enable warning+' " "enables all warning, error and critical messages.\n" "\t'--log.enable debug:framing' " - "enables debug messages from the framing component.") + "enables debug messages from the framing component.").c_str()) ("log.output", optValue(outputs, "FILE"), "File to receive log output, or one of these special values: " "'stderr', 'stdout', 'syslog'.") @@ -61,9 +59,6 @@ void Options::addTo(po::options_description& desc) { "Include thread ID in log messages") ("log.function", optValue(function,"yes|no"), "Include function signature in log messages"); - } - - }} // namespace qpid::log -- cgit v1.2.1