Skip to content

Commit

Permalink
Improve message logging for bulk pull requests (#3065)
Browse files Browse the repository at this point in the history
* Improve message logging for bulk pull request

* Improve message logging for bulk pull requests
  • Loading branch information
SergiySW authored Jan 5, 2021
1 parent a8e43aa commit 4aa7fc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nano/node/bootstrap/bootstrap_bulk_pull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ nano::bulk_pull_client::~bulk_pull_client ()
connection->node->bootstrap_initiator.connections->requeue_pull (pull, network_error);
if (connection->node->config.logging.bulk_pull_logging ())
{
connection->node->logger.try_log (boost::str (boost::format ("Bulk pull end block is not expected %1% for account %2%") % pull.end.to_string () % pull.account_or_head.to_account ()));
connection->node->logger.try_log (boost::str (boost::format ("Bulk pull end block is not expected %1% for account %2% or head block %3%") % pull.end.to_string () % pull.account_or_head.to_account () % pull.account_or_head.to_string ()));
}
}
else
Expand Down Expand Up @@ -74,7 +74,7 @@ void nano::bulk_pull_client::request ()

if (connection->node->config.logging.bulk_pull_logging ())
{
connection->node->logger.try_log (boost::str (boost::format ("Requesting account %1% from %2%. %3% accounts in queue") % pull.account_or_head.to_account () % connection->channel->to_string () % attempt->pulling));
connection->node->logger.try_log (boost::str (boost::format ("Requesting account %1% or head block %2% from %3%. %4% accounts in queue") % pull.account_or_head.to_account () % pull.account_or_head.to_string () % connection->channel->to_string () % attempt->pulling));
}
else if (connection->node->config.logging.network_logging () && attempt->should_log ())
{
Expand Down
2 changes: 1 addition & 1 deletion nano/node/bootstrap/bootstrap_connections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void nano::bootstrap_connections::requeue_pull (nano::pull_info const & pull_a,
{
if (node.config.logging.bulk_pull_logging ())
{
node.logger.try_log (boost::str (boost::format ("Failed to pull account %1% down to %2% after %3% attempts and %4% blocks processed") % pull.account_or_head.to_account () % pull.end.to_string () % pull.attempts % pull.processed));
node.logger.try_log (boost::str (boost::format ("Failed to pull account %1% or head block %2% down to %3% after %4% attempts and %5% blocks processed") % pull.account_or_head.to_account () % pull.account_or_head.to_string () % pull.end.to_string () % pull.attempts % pull.processed));
}
node.stats.inc (nano::stat::type::bootstrap, nano::stat::detail::bulk_pull_failed_account, nano::stat::dir::in);

Expand Down

0 comments on commit 4aa7fc9

Please # to comment.