From f9eda9ffceec63e0722735634d4ab54d32b853dd Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 16 Oct 2007 13:01:33 +0000 Subject: Edits to --help message and man page to improve readabiliity. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@585137 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/Options.cpp | 8 ++++---- cpp/src/qpid/Options.h | 2 +- cpp/src/qpid/broker/Broker.cpp | 13 +++++++------ cpp/src/qpid/cluster/ClusterPlugin.cpp | 2 +- cpp/src/qpid/log/Options.cpp | 20 +++++++++++--------- cpp/src/qpidd.cpp | 8 ++++---- 6 files changed, 28 insertions(+), 25 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/Options.cpp b/cpp/src/qpid/Options.cpp index 291df341e7..e44d053dae 100644 --- a/cpp/src/qpid/Options.cpp +++ b/cpp/src/qpid/Options.cpp @@ -59,7 +59,7 @@ struct EnvOptMapper { } std::string prettyArg(const std::string& name, const std::string& value) { - return value.empty() ? name+" " : name+" (="+value+") "; + return value.empty() ? name+" " : name+" ("+value+") "; } Options::Options(const string& name) : po::options_description(name) {} @@ -104,9 +104,9 @@ CommonOptions::CommonOptions(const string& name, const string& configfile) : Options(name), config(configfile) { addOptions() - ("help,h", optValue(help), "Print help message.") - ("version,v", optValue(version), "Print version information.") - ("config", optValue(config, "FILE"), "Configuration file."); + ("help,h", optValue(help), "Displays the help message") + ("version,v", optValue(version), "Displays version information") + ("config", optValue(config, "FILE"), "Reads configuration from FILE"); } } // namespace qpid diff --git a/cpp/src/qpid/Options.h b/cpp/src/qpid/Options.h index f46e32032b..b421e12b27 100644 --- a/cpp/src/qpid/Options.h +++ b/cpp/src/qpid/Options.h @@ -98,7 +98,7 @@ inline po::value_semantic* optValue(bool& value) { return po::bool_switch(&value MyOptions() : Options("My Options") { addOptions() ("z", boolSwitch(z), "Option Z") - ("foo", optValue(foo), "Multiple option foo."); + ("foo", optValue(foo), "Multiple option foo"); add(subOptions); } diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp index bfb0a09bf0..cfbe6a0bcc 100644 --- a/cpp/src/qpid/broker/Broker.cpp +++ b/cpp/src/qpid/broker/Broker.cpp @@ -62,17 +62,18 @@ Broker::Options::Options(const std::string& name) : stagingThreshold(5000000) { addOptions() - ("port,p", optValue(port,"PORT"), "Use PORT for AMQP connections.") + ("port,p", optValue(port,"PORT"), + "Tells the broker to listen on PORT") ("worker-threads", optValue(workerThreads, "N"), - "Broker thread pool size") + "Sets the broker thread pool size") ("max-connections", optValue(maxConnections, "N"), - "Maximum allowed connections") + "Sets the maximum allowed connections") ("connection-backlog", optValue(connectionBacklog, "N"), - "Connection backlog limit for server socket.") + "Sets the connection backlog limit for the server socket") ("staging-threshold", optValue(stagingThreshold, "N"), - "Messages over N bytes are staged to disk.") + "Stages messages over N bytes to disk") ("store,s", optValue(store,"LIBNAME"), - "Name of message store shared library."); + "Tells the broker to use the message store shared library LIBNAME for persistence"); } const std::string empty; diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 4e95a42560..309fd6afd0 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -37,7 +37,7 @@ struct ClusterPlugin : public Plugin { ClusterOptions() : Options("Cluster Options") { addOptions() ("cluster", optValue(clusterName, "NAME"), - "Join the cluster named NAME"); + "Joins the cluster named NAME"); } }; diff --git a/cpp/src/qpid/log/Options.cpp b/cpp/src/qpid/log/Options.cpp index b15630ebb2..592c10a48a 100644 --- a/cpp/src/qpid/log/Options.cpp +++ b/cpp/src/qpid/log/Options.cpp @@ -36,19 +36,21 @@ Options::Options(const std::string& name) : qpid::Options(name), for (int i = 1; i < LevelTraits::COUNT; ++i) levels << " " << LevelTraits::name(Level(i)); addOptions() - ("trace,t", optValue(trace), "Enable full debug tracing." ) + ("log.output", optValue(outputs, "FILE"), + "Send log output to FILE. " + "FILE can be a file name or one of the special values:\n" + "stderr, stdout, syslog") + ("trace,t", optValue(trace), "Enables all logging" ) ("log.enable", optValue(selectors, "RULE"), - ("You can specify this option mutliple times.\n" - "RULE is of the form 'LEVEL[+][:COMPONENT]'" - "Levels are: "+levels.str()+"\n" + ("Enables logging for selected levels and components. " + "RULE is in the form 'LEVEL[+][:COMPONENT]' " + "Levels are one of: \n\t "+levels.str()+"\n" "For example:\n" "\t'--log.enable warning+' " - "enables all warning, error and critical messages.\n" + "logs all warning, error and critical messages.\n" "\t'--log.enable debug:framing' " - "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'.") + "logs debug messages from the framing component. " + "This option can be used multiple times").c_str()) ("log.time", optValue(time, "yes|no"), "Include time in log messages") ("log.level", optValue(level,"yes|no"), diff --git a/cpp/src/qpidd.cpp b/cpp/src/qpidd.cpp index 97dd83689d..00fa8d8d21 100644 --- a/cpp/src/qpidd.cpp +++ b/cpp/src/qpidd.cpp @@ -47,10 +47,10 @@ struct DaemonOptions : public qpid::Options { DaemonOptions() : qpid::Options("Daemon options"), daemon(false), quit(false), check(false), wait(10) { addOptions() - ("daemon,d", optValue(daemon), "Run as a daemon. With --port 0 print actual listening port.") - ("wait,w", optValue(wait, "SECONDS"), "Maximum wait for daemon response.") - ("check,c", optValue(check), "If a daemon is running print its pid to stdout and return 0.") - ("quit,q", optValue(quit), "Stop the running daemon politely."); + ("daemon,d", optValue(daemon), "Run as a daemon.") + ("wait,w", optValue(wait, "SECONDS"), "Sets the maximum wait time to initialize the daemon. If the daemon fails to initialize, prints an error and returns 1") + ("check,c", optValue(check), "Prints the daemon's process ID to stdout and returns 0 if the daemon is running, otherwise returns 1") + ("quit,q", optValue(quit), "Tells the daemon to shut down"); } }; -- cgit v1.2.1