diff --git a/src/v/cluster/partition_manager.cc b/src/v/cluster/partition_manager.cc index 99ccf8c9a70aa..d304e9d6a1cab 100644 --- a/src/v/cluster/partition_manager.cc +++ b/src/v/cluster/partition_manager.cc @@ -399,7 +399,8 @@ void partition_manager::check_partitions_shutdown_state() { const auto now = ss::lowres_clock::now(); for (auto& state : _partitions_shutting_down) { if (state.last_update_timestamp < now - _partition_shutdown_timeout()) { - clusterlog.error( + vlog( + clusterlog.error, "partition {} shutdown takes longer than expected, current " "shutdown stage: {} time since last update: {} seconds", state.partition->ntp(), diff --git a/src/v/rpc/rpc_server.cc b/src/v/rpc/rpc_server.cc index e9cf229a77b50..114018d192ee9 100644 --- a/src/v/rpc/rpc_server.cc +++ b/src/v/rpc/rpc_server.cc @@ -210,37 +210,46 @@ ss::future<> rpc_server::dispatch_method_once( ctx->pr.set_exception(e); return ss::now(); } catch (const ss::timed_out_error& e) { - rpclog.debug("Timing out request on timed_out_error " - "(shutting down)"); + vlog( + rpclog.debug, + "Timing out request on timed_out_error " + "(shutting down)"); reply_buf.set_status(rpc::status::request_timeout); } catch (const ss::condition_variable_timed_out& e) { - rpclog.debug( + vlog( + rpclog.debug, "Timing out request on condition_variable_timed_out"); reply_buf.set_status(rpc::status::request_timeout); } catch (const ss::gate_closed_exception& e) { // gate_closed is typical during shutdown. Treat // it like a timeout: request was not erroneous // but we will not give a rseponse. - rpclog.debug( + vlog( + rpclog.debug, "Timing out request on gate_closed_exception " "(shutting down)"); reply_buf.set_status(rpc::status::request_timeout); } catch (const ss::broken_condition_variable& e) { - rpclog.debug( + vlog( + rpclog.debug, "Timing out request on broken_condition_variable " "(shutting down)"); reply_buf.set_status(rpc::status::request_timeout); } catch (const ss::abort_requested_exception& e) { - rpclog.debug( + vlog( + rpclog.debug, "Timing out request on abort_requested_exception " "(shutting down)"); reply_buf.set_status(rpc::status::request_timeout); } catch (const ss::broken_semaphore& e) { - rpclog.debug("Timing out request on broken_semaphore " - "(shutting down)"); + vlog( + rpclog.debug, + "Timing out request on broken_semaphore " + "(shutting down)"); reply_buf.set_status(rpc::status::request_timeout); } catch (...) { - rpclog.error( + vlog( + rpclog.error, "Service handler threw an exception: {}", std::current_exception()); probe().service_error(); @@ -268,7 +277,7 @@ ss::future<> rpc_server::dispatch_method_once( }); }) .handle_exception([](const std::exception_ptr& e) { - rpclog.error("Error dispatching: {}", e); + vlog(rpclog.error, "Error dispatching: {}", e); }); return fut; diff --git a/src/v/rpc/transport.cc b/src/v/rpc/transport.cc index 1ede58b05b3bf..94bb507cfc7b2 100644 --- a/src/v/rpc/transport.cc +++ b/src/v/rpc/transport.cc @@ -110,12 +110,14 @@ transport::connect(rpc::clock_type::time_point connection_timeout) { } catch (...) { auto e = std::current_exception(); if (net::is_disconnect_exception(e)) { - rpc::rpclog.info( + vlog( + rpc::rpclog.info, "Disconnected from server {}: {}", server_address(), e); } else { - rpc::rpclog.error( + vlog( + rpc::rpclog.error, "Error dispatching client reads to {}: {}", server_address(), e);