Skip to content

Commit

Permalink
Avoid noisy logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed May 1, 2024
1 parent f881208 commit 28af014
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nano/lib/thread_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ nano::thread_runner::thread_runner (std::shared_ptr<boost::asio::io_context> io_
{
debug_assert (io_ctx != nullptr);

logger.debug (nano::log::type::thread_runner, "Starting threads: {} ({})", num_threads, to_string (role));

for (auto i (0u); i < num_threads; ++i)
{
threads.emplace_back (nano::thread_attributes::get_default (), [this, i] () {
nano::thread_role::set (role);
try
{
logger.debug (nano::log::type::thread_runner, "Started thread #{} ({})", i, to_string (role));
run ();
logger.debug (nano::log::type::thread_runner, "Stopped thread #{} ({})", i, to_string (role));
}
catch (std::exception const & ex)
{
Expand Down Expand Up @@ -88,6 +88,9 @@ void nano::thread_runner::join ()
i.join ();
}
}

logger.debug (nano::log::type::thread_runner, "Stopped threads ({})", to_string (role));

io_ctx.reset ();
}

Expand Down

0 comments on commit 28af014

Please sign in to comment.