diff options
| author | Alan Conway <aconway@apache.org> | 2014-01-27 20:35:02 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-01-27 20:35:02 +0000 |
| commit | 344fe63e0f7628420cc639cd44e4c315a9ec370b (patch) | |
| tree | e41913f8778b00eb65553efe4adbbcc52d02ae30 /qpid/cpp/src | |
| parent | b710193d135c55357d3333bd55a733a49c361632 (diff) | |
| download | qpid-python-344fe63e0f7628420cc639cd44e4c315a9ec370b.tar.gz | |
NO-JIRA: Minor rationalization of log statement priorities.
Demote "backup of queue x connected to y" from info to debug.
Tighten up redundant 'notice' messages around promotion of primary.
Promote 'DTX not implemented' to warning
Misc. other minor adjustments.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1561833 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/ha/Backup.cpp | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/BrokerReplicator.cpp | 4 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/HaBroker.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/HaPlugin.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/Primary.cpp | 12 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/QueueReplicator.cpp | 2 |
6 files changed, 10 insertions, 13 deletions
diff --git a/qpid/cpp/src/qpid/ha/Backup.cpp b/qpid/cpp/src/qpid/ha/Backup.cpp index 26f7baf104..beae53d85f 100644 --- a/qpid/cpp/src/qpid/ha/Backup.cpp +++ b/qpid/cpp/src/qpid/ha/Backup.cpp @@ -94,7 +94,6 @@ Role* Backup::recover(Mutex::ScopedLock&) { Mutex::ScopedLock l(lock); if (stopped) return 0; stop(l); // Stop backup activity before starting primary. - QPID_LOG(notice, "Promoting to primary: " << haBroker.getBrokerInfo()); // Reset membership before allowing backups to connect. backups = membership.otherBackups(); membership.clear(); diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp index 49e7346525..b1faf19e52 100644 --- a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp @@ -256,7 +256,7 @@ class BrokerReplicator::UpdateTracker { private: void clean(const std::string& name) { - QPID_LOG(info, "Backup: Deleted " << type << " " << name << + QPID_LOG(debug, "Backup: Deleted " << type << " " << name << ": no longer exists on primary"); try { cleanFn(name); } catch (const framing::NotFoundException&) {} @@ -369,7 +369,7 @@ void BrokerReplicator::connected(Bridge& bridge, SessionHandler& sessionHandler) link->getRemoteAddress(primary); string queueName = bridge.getQueueName(); - QPID_LOG(info, logPrefix << (initialized ? "Failing over" : "Connecting") + QPID_LOG(notice, logPrefix << (initialized ? "Failing over" : "Connecting") << " to primary " << primary << " status:" << printable(haBroker.getStatus())); initialized = true; diff --git a/qpid/cpp/src/qpid/ha/HaBroker.cpp b/qpid/cpp/src/qpid/ha/HaBroker.cpp index 90ebd423c8..25703eeeb2 100644 --- a/qpid/cpp/src/qpid/ha/HaBroker.cpp +++ b/qpid/cpp/src/qpid/ha/HaBroker.cpp @@ -108,7 +108,7 @@ bool isNone(const std::string& x) { return x.empty() || x == NONE; } void HaBroker::initialize() { if (settings.cluster) { membership.setStatus(JOINING); - QPID_LOG(notice, "Initializing HA broker: " << membership.getSelf()); + QPID_LOG(info, "Initializing HA broker: " << membership.getSelf()); } // Set up the management object. diff --git a/qpid/cpp/src/qpid/ha/HaPlugin.cpp b/qpid/cpp/src/qpid/ha/HaPlugin.cpp index d26b466847..ddf2994c78 100644 --- a/qpid/cpp/src/qpid/ha/HaPlugin.cpp +++ b/qpid/cpp/src/qpid/ha/HaPlugin.cpp @@ -72,7 +72,7 @@ struct HaPlugin : public Plugin { broker::Broker* broker = dynamic_cast<broker::Broker*>(&target); if (broker && (settings.cluster || settings.queueReplication)) { if (!broker->getManagementAgent()) { - QPID_LOG(info, "HA plugin disabled because management is disabled"); + QPID_LOG(warning, "HA plugin disabled because management is disabled"); if (settings.cluster) throw Exception("Cannot start HA: management is disabled"); } else { diff --git a/qpid/cpp/src/qpid/ha/Primary.cpp b/qpid/cpp/src/qpid/ha/Primary.cpp index 081fd7b6c7..3bb51b1813 100644 --- a/qpid/cpp/src/qpid/ha/Primary.cpp +++ b/qpid/cpp/src/qpid/ha/Primary.cpp @@ -105,14 +105,12 @@ Primary::Primary(HaBroker& hb, const BrokerInfo::Set& expect) : QueueReplicator::copy(hb.getBroker().getExchanges(), qrs); std::for_each(qrs.begin(), qrs.end(), boost::bind(&QueueReplicator::promoted, _1)); - if (expect.empty()) { - QPID_LOG(notice, logPrefix << "Promoted to primary. No expected backups."); - } - else { + if (!expect.empty()) { // NOTE: RemoteBackups must be created before we set the BrokerObserver // or ConnectionObserver so that there is no client activity while // the QueueGuards are created. - QPID_LOG(notice, logPrefix << "Promoted to primary. Expected backups: " << expect); + QPID_LOG(notice, logPrefix << "Promoted and recovering, waiting for backups: " + << expect); for (BrokerInfo::Set::const_iterator i = expect.begin(); i != expect.end(); ++i) { boost::shared_ptr<RemoteBackup> backup(new RemoteBackup(*i, 0)); backups[i->getSystemId()] = backup; @@ -147,7 +145,7 @@ void Primary::checkReady() { activate = active = true; } if (activate) { - QPID_LOG(notice, logPrefix << "Finished waiting for backups, primary is active."); + QPID_LOG(notice, logPrefix << "Promoted and active."); membership.setStatus(ACTIVE); // Outside of lock. } } @@ -419,7 +417,7 @@ void Primary::startTx(const boost::intrusive_ptr<broker::TxBuffer>& txBuffer) { } void Primary::startDtx(const boost::intrusive_ptr<broker::DtxBuffer>& ) { - QPID_LOG(notice, "DTX transactions in a HA cluster are not yet atomic"); + QPID_LOG(warning, "DTX transactions in a HA cluster are not yet atomic"); } }} // namespace qpid::ha diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp index ffb40fdf22..507df6ea5a 100644 --- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp @@ -240,7 +240,7 @@ void QueueReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHa } qpid::Address primary; link->getRemoteAddress(primary); - QPID_LOG(info, logPrefix << "Connected to " << primary << "(" << bridgeName << ")"); + QPID_LOG(debug, logPrefix << "Connected to " << primary << "(" << bridgeName << ")"); QPID_LOG(trace, logPrefix << "Subscription arguments: " << arguments); } |
