summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2015-04-27 16:52:27 +0000
committerAlan Conway <aconway@apache.org>2015-04-27 16:52:27 +0000
commitdb7b30e0f7e7e080071df08c6589036820bdb443 (patch)
treea6c114bf7a99e617a61b9d429eab0c6ef9af332d /qpid/cpp/src
parentada6ab9d5319de3545132aac23b880c7458e0c64 (diff)
downloadqpid-python-db7b30e0f7e7e080071df08c6589036820bdb443.tar.gz
NO-JIRA: Add log command to qpid-config to set log levels.
Get current level: qpid-config log Set new level: qpid-config log <newlevel> Fixed bugs in getLogLevel and in handling invalid log levels. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1676333 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/log/Logger.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/log/Logger.cpp b/qpid/cpp/src/qpid/log/Logger.cpp
index 7b1e22f80c..fc254f2857 100644
--- a/qpid/cpp/src/qpid/log/Logger.cpp
+++ b/qpid/cpp/src/qpid/log/Logger.cpp
@@ -160,21 +160,23 @@ void Logger::add(Statement& s) {
}
void Logger::configure(const Options& opts) {
- options = opts;
clear();
Options o(opts);
if (o.trace)
o.selectors.push_back("trace+");
format(o);
select(Selector(o));
+ options = opts;
setPrefix(opts.prefix);
options.sinkOptions->setup(this);
}
void Logger::reconfigure(const std::vector<std::string>& selectors) {
- options.selectors = selectors;
- options.deselectors.clear();
- select(Selector(options));
+ Options o(options);
+ o.selectors = selectors;
+ o.deselectors.clear();
+ select(Selector(o));
+ options = o; // Don't update options till selectors has been validated.
}
void Logger::setPrefix(const std::string& p) { prefix = p; }