Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit 83b087f

Browse files
davidvigierfacebook-github-bot
authored andcommitted
Only log debug messages in AdminCommandClient
Summary: Error codes are returned to the caller in case of any error occurring while using the AdminCommandClient. The caller may decide to log a message at error level or higher. In any case, the AdminCommandClient should not pollute the logs with messages that the caller may consider harmless. My diff turns all logging from AdminCommandClient into debug logging. Reviewed By: tau0 Differential Revision: D17534144 fbshipit-source-id: e7f0e97bbb94e4c04ddc02ac9b302a86acf841ab
1 parent 1bbd248 commit 83b087f

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

logdevice/ops/admin_command_client/AdminCommandClient.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class AdminClientConnection
7373
void connectErr(const AsyncSocketException& ex) noexcept override {
7474
request_response_.success = false;
7575
request_response_.failure_reason = "CONNECTION_ERROR";
76-
ld_error("Could not connect to %s: %s",
76+
ld_debug("Could not connect to %s: %s",
7777
request_response_.sockaddr.describe().c_str(),
7878
ex.what());
7979
done();
@@ -132,7 +132,7 @@ class AdminClientConnection
132132
}
133133

134134
void readErr(const AsyncSocketException& ex) noexcept override {
135-
ld_error("Error reading from %s: %s",
135+
ld_debug("Error reading from %s: %s",
136136
request_response_.sockaddr.describe().c_str(),
137137
ex.what());
138138
success_ = false;
@@ -146,7 +146,7 @@ class AdminClientConnection
146146

147147
void writeErr(size_t /*bytesWritten*/,
148148
const AsyncSocketException& ex) noexcept override {
149-
ld_error("Error writting to %s: %s",
149+
ld_debug("Error writing to %s: %s",
150150
request_response_.sockaddr.describe().c_str(),
151151
ex.what());
152152
request_response_.failure_reason = "WRITE_ERROR";
@@ -185,13 +185,13 @@ class AdminClientConnection
185185
double d2 =
186186
std::chrono::duration_cast<std::chrono::duration<double>>(tend - tdone)
187187
.count();
188-
ld_info("Response from %s has %lu chunks, response size is %lu, "
189-
"fetching data took %.1fs, preparing response took %.1fs",
190-
request_response_.sockaddr.describe().c_str(),
191-
result_.size(),
192-
size,
193-
d1,
194-
d2);
188+
ld_debug("Response from %s has %lu chunks, response size is %lu, "
189+
"fetching data took %.1fs, preparing response took %.1fs",
190+
request_response_.sockaddr.describe().c_str(),
191+
result_.size(),
192+
size,
193+
d1,
194+
d2);
195195
result_.clear();
196196
}
197197

@@ -285,7 +285,7 @@ AdminCommandClient::semifuture_send(
285285
}
286286

287287
if (timed_out) {
288-
ld_error("Timed out after %lums reading from %lu nodes",
288+
ld_debug("Timed out after %lums reading from %lu nodes",
289289
command_timeout.count(),
290290
connections_size - connections_done);
291291
for (size_t i = start;

0 commit comments

Comments
 (0)