Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Reduce logging to help loki (#2405)
Browse files Browse the repository at this point in the history
  • Loading branch information
n-hutton authored Feb 7, 2020
1 parent 2f24e12 commit 02c2621
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/ledger/src/miner/basic_miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void BasicMiner::GenerateBlock(Block &block, std::size_t num_lanes, std::size_t
// cache the size of the mining pool
std::size_t const pool_size_before = mining_pool_.size();

FETCH_LOG_INFO(LOGGING_NAME, "Starting block packing. Pool Size: ", pool_size_before);
FETCH_LOG_DEBUG(LOGGING_NAME, "Starting block packing. Pool Size: ", pool_size_before);

// determine how many of the threads should be used in this block generation
auto const num_threads = Clip3<std::size_t>(mining_pool_.size() / 1000u, 1u, max_num_threads_);
Expand Down
12 changes: 6 additions & 6 deletions libs/ledger/src/storage_unit/transaction_store_sync_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@ TSSP::TxArray TransactionStoreSyncProtocol::PullObjects(service::CallContext con
}
}

if (!ret.empty())
{
FETCH_LOG_INFO(LOGGING_NAME, "Lane ", lane_, ": PullObjects: Sending back ", ret.size(),
" TXs");
}

return ret;
}

Expand Down Expand Up @@ -211,6 +205,12 @@ TSSP::TxArray TransactionStoreSyncProtocol::PullSpecificObjects(DigestSet const
}
}

if (!ret.empty())
{
FETCH_LOG_INFO(LOGGING_NAME, "Lane ", lane_, ": PullSpecificObjects: Sending back ", ret.size(),
" TXs");
}

return ret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ TransactionStoreSyncService::State TransactionStoreSyncService::OnResolvingObjec
if (counts.failed != 0u)
{
FETCH_LOG_WARN(LOGGING_NAME, "Lane ", cfg_.lane_id, ": ", "Failed promises: ", counts.failed);
pending_objects_.DiscardFailures();
}

return State::TRIM_CACHE;
Expand Down

0 comments on commit 02c2621

Please sign in to comment.