Reduce chatty log outputs

This commit is contained in:
JoelKatz
2015-03-15 16:11:49 -07:00
committed by Nik Bougalis
parent f813cb2310
commit ff7dc0b446
9 changed files with 18 additions and 16 deletions

View File

@@ -385,7 +385,7 @@ public:
{
leaveConsensus();
WriteLog (lsERROR, LedgerConsensus) <<
"Missind node processing complete map " << mn;
"Missing node processing complete map " << mn;
throw;
}
}
@@ -393,7 +393,7 @@ public:
void mapCompleteInternal (uint256 const& hash,
std::shared_ptr<SHAMap> const& map, bool acquired)
{
CondLog (acquired, lsINFO, LedgerConsensus)
CondLog (acquired, lsDEBUG, LedgerConsensus)
<< "We have acquired TXS " << hash;
if (!map) // If the map was invalid
@@ -2090,7 +2090,7 @@ void applyTransactions (std::shared_ptr<SHAMap> const& set,
if (!checkLedger->hasTransaction (item->getTag ()))
{
// Then try to apply the transaction to applyLedger
WriteLog (lsINFO, LedgerConsensus) <<
WriteLog (lsDEBUG, LedgerConsensus) <<
"Processing candidate transaction: " << item->getTag ();
try
{

View File

@@ -46,6 +46,7 @@ namespace ripple {
#define MIN_VALIDATION_RATIO 150 // 150/256ths of validations of previous ledger
#define MAX_LEDGER_GAP 100 // Don't catch up more than 100 ledgers (cannot exceed 256)
#define MAX_LEDGER_AGE_ACQUIRE 60 // Don't acquire history if ledger is too old
class LedgerMasterImp
: public LedgerMaster
@@ -936,7 +937,7 @@ public:
if (!standalone_ && !getApp().getFeeTrack().isLoadedLocal() &&
(getApp().getJobQueue().getJobCount(jtPUBOLDLEDGER) < 10) &&
(mValidLedgerSeq == mPubLedgerSeq) &&
(getValidatedLedgerAge() < 60))
(getValidatedLedgerAge() < MAX_LEDGER_AGE_ACQUIRE))
{ // We are in sync, so can acquire
std::uint32_t missing;
{

View File

@@ -130,7 +130,7 @@ bool ContinuousLedgerTiming::haveConsensus (
// If 80% of current proposers (plus us) agree on a set, we have consensus
if (((currentAgree * 100 + 100) / (currentProposers + 1)) > 80)
{
CondLog (forReal, lsINFO, LedgerTiming) << "normal consensus";
CondLog (forReal, lsDEBUG, LedgerTiming) << "normal consensus";
failed = false;
return true;
}

View File

@@ -410,22 +410,22 @@ ledger and then attempts to resume a continuous stream.
## Implementation ##
LedgerMaster::doAdvance is invoked when work may need to be done to
`LedgerMaster::doAdvance` is invoked when work may need to be done to
publish ledgers to clients. This code loops until it cannot make further
progress.
LedgerMaster::findNewLedgersToPublish is called first. If the last
`LedgerMaster::findNewLedgersToPublish` is called first. If the last
fully-valid ledger's sequence number is greater than the last published
ledger's sequence number, it attempts to publish those ledgers, retrieving
them if needed.
If there are no new ledgers to publish, doAdvance determines if it can
If there are no new ledgers to publish, `doAdvance` determines if it can
backfill history. If the publication is not caught up, bakfilling is not
attempted to conserve resources.
If history can be backfilled, the missing ledger with the highest
sequence number is retrieved first. If a historical ledger is retrieved,
and its predecessor is in the database, tryFill is invoked to update
and its predecessor is in the database, `tryFill` is invoked to update
the list of resident ledgers.
---

View File

@@ -1040,7 +1040,7 @@ Transaction::pointer NetworkOPsImp::processTransactionCb (
if (r == tesSUCCESS)
{
m_journal.info << "Transaction is now included in open ledger";
m_journal.debug << "Transaction is now included in open ledger";
trans->setStatus (INCLUDED);
// VFALCO NOTE The value of trans can be changed here!
@@ -1702,7 +1702,7 @@ SHAMapAddNode NetworkOPsImp::gotTXData (
if (!mConsensus)
{
m_journal.warning << "Got TX data with no consensus object";
m_journal.debug << "Got TX data with no consensus object";
return SHAMapAddNode ();
}
@@ -2792,7 +2792,7 @@ void NetworkOPsImp::pubAccountTransaction (
}
}
}
m_journal.info << "pubAccountTransaction:" <<
m_journal.trace << "pubAccountTransaction:" <<
" iProposed=" << iProposed <<
" iAccepted=" << iAccepted;

View File

@@ -90,7 +90,8 @@ void PeerSet::invokeOnTimer ()
if (!isProgress())
{
++mTimeouts;
WriteLog (lsWARNING, InboundLedger) << "Timeout(" << mTimeouts << ") pc=" << mPeers.size () << " acquiring " << mHash;
WriteLog (lsDEBUG, InboundLedger) << "Timeout(" << mTimeouts
<< ") pc=" << mPeers.size () << " acquiring " << mHash;
onTimer (false, sl);
}
else

View File

@@ -71,7 +71,7 @@ void TransactionAcquire::done ()
}
else
{
WriteLog (lsINFO, TransactionAcquire) << "Acquired TX set " << mHash;
WriteLog (lsDEBUG, TransactionAcquire) << "Acquired TX set " << mHash;
mMap->setImmutable ();
map = mMap;
}

View File

@@ -1654,7 +1654,7 @@ PeerImp::getLedger (std::shared_ptr<protocol::TMGetLedger> const& m)
return;
}
p_journal_.error <<
p_journal_.debug <<
"GetLedger: Can't provide map ";
charge (Resource::feeInvalidRequest);
return;

View File

@@ -870,7 +870,7 @@ SHAMap::updateGiveItem (std::shared_ptr<SHAMapItem> const& item,
if (!node->setItem (item, !isTransaction ? SHAMapTreeNode::tnACCOUNT_STATE :
(hasMeta ? SHAMapTreeNode::tnTRANSACTION_MD : SHAMapTreeNode::tnTRANSACTION_NM)))
{
if (journal_.warning) journal_.warning <<
journal_.trace <<
"SHAMap setItem, no change";
return true;
}