Skip to content

Commit 3124601

Browse files
authored
CPP-933 Reduce the log severity of protocol negotiation errors/warnings (#480)
1 parent 2d39311 commit 3124601

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/cluster_connector.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ void ClusterConnector::on_resolve(ClusterMetadataResolver* resolver) {
186186
}
187187

188188
void ClusterConnector::on_connect(ControlConnector* connector) {
189-
if (!connector->is_ok() && !connector->is_canceled()) {
189+
// Ignore logging protocol errors here because they're handled below
190+
if (!connector->is_ok() && !connector->is_canceled() && !connector->is_invalid_protocol()) {
190191
LOG_ERROR(
191192
"Unable to establish a control connection to host %s because of the following error: %s",
192193
connector->address().to_string().c_str(), connector->error_message().c_str());
@@ -283,7 +284,7 @@ void ClusterConnector::on_connect(ControlConnector* connector) {
283284
on_error(CLUSTER_ERROR_INVALID_PROTOCOL, "Unable to find supported protocol version");
284285
return;
285286
}
286-
LOG_WARN("Host %s does not support protocol version %s. "
287+
LOG_INFO("Host %s does not support protocol version %s. "
287288
"Trying protocol version %s...",
288289
connector->address().to_string().c_str(),
289290
connector->protocol_version().to_string().c_str(), lower_version.to_string().c_str());

0 commit comments

Comments
 (0)