Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.2.x] Wrapped logging with vlog macro in places that missed it #16494

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/v/cluster/partition_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
29 changes: 19 additions & 10 deletions src/v/rpc/rpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions src/v/rpc/transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down