diff options
| author | Charles E. Rolke <chug@apache.org> | 2013-04-26 21:38:07 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2013-04-26 21:38:07 +0000 |
| commit | 73c2b2cb960135d39c9eb476357d9d57ef68d489 (patch) | |
| tree | 413c68a47cc3c5534db12fd1bc5dbaf064f9b948 /cpp/src/qpid/log/Options.cpp | |
| parent | 0890df638db03bae29b3bd6099f13a5433ab05cd (diff) | |
| download | qpid-python-73c2b2cb960135d39c9eb476357d9d57ef68d489.tar.gz | |
QPID-4651: C++ Broker add --log-disable option
Reviewed at https://reviews.apache.org/r/10799/
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1476409 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/log/Options.cpp')
| -rw-r--r-- | cpp/src/qpid/log/Options.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/cpp/src/qpid/log/Options.cpp b/cpp/src/qpid/log/Options.cpp index 10422bbb1e..b310b7cfac 100644 --- a/cpp/src/qpid/log/Options.cpp +++ b/cpp/src/qpid/log/Options.cpp @@ -59,16 +59,33 @@ Options::Options(const std::string& argv0_, const std::string& name_) : ("trace,t", optValue(trace), "Enables all logging" ) ("log-enable", optValue(selectors, "RULE"), ("Enables logging for selected levels and components. " - "RULE is in the form 'LEVEL[+][:PATTERN]' " + "RULE is in the form 'LEVEL[+-][:PATTERN]'\n" "LEVEL is one of: \n\t "+levels.str()+"\n" - "PATTERN is a function name or a catogory: \n\t "+categories.str()+"\n" + "PATTERN is a logging category name, or a namespace-qualified " + "function name or name fragment. " + "Logging category names are: \n\t "+categories.str()+"\n" "For example:\n" - "\t'--log-enable warning+' " + "\t'--log-enable warning+'\n" "logs all warning, error and critical messages.\n" - "\t'--log-enable trace+:Broker' " + "\t'--log-enable trace+:Broker'\n" "logs all category 'Broker' messages.\n" - "\t'--log-enable debug:framing' " - "logs debug messages from the framing namespace. " + "\t'--log-enable debug:framing'\n" + "logs debug messages from all functions with 'framing' in the namespace or function name.\n" + "This option can be used multiple times").c_str()) + ("log-disable", optValue(deselectors, "RULE"), + ("Disables logging for selected levels and components. " + "RULE is in the form 'LEVEL[+-][:PATTERN]'\n" + "LEVEL is one of: \n\t "+levels.str()+"\n" + "PATTERN is a logging category name, or a namespace-qualified " + "function name or name fragment. " + "Logging category names are: \n\t "+categories.str()+"\n" + "For example:\n" + "\t'--log-disable warning-'\n" + "disables logging all warning, notice, info, debug, and trace messages.\n" + "\t'--log-disable trace:Broker'\n" + "disables all category 'Broker' trace messages.\n" + "\t'--log-disable debug-:qmf::'\n" + "disables logging debug and trace messages from all functions with 'qmf::' in the namespace.\n" "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"), "Include severity level in log messages") @@ -77,7 +94,7 @@ Options::Options(const std::string& argv0_, const std::string& name_) : ("log-function", optValue(function,"yes|no"), "Include function signature in log messages") ("log-hires-timestamp", optValue(hiresTs,"yes|no"), "Use hi-resolution timestamps in log messages") ("log-category", optValue(category,"yes|no"), "Include category in log messages") - ("log-prefix", optValue(prefix,"STRING"), "Prefix to append to all log messages") + ("log-prefix", optValue(prefix,"STRING"), "Prefix to prepend to all log messages") ; add(*sinkOptions); } @@ -87,6 +104,7 @@ Options::Options(const Options &o) : argv0(o.argv0), name(o.name), selectors(o.selectors), + deselectors(o.deselectors), time(o.time), level(o.level), thread(o.thread), @@ -106,6 +124,7 @@ Options& Options::operator=(const Options& x) { argv0 = x.argv0; name = x.name; selectors = x.selectors; + deselectors = x.deselectors; time = x.time; level= x.level; thread = x.thread; |
