diff options
Diffstat (limited to 'src/mongo/util/net/socket_utils.cpp')
-rw-r--r-- | src/mongo/util/net/socket_utils.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mongo/util/net/socket_utils.cpp b/src/mongo/util/net/socket_utils.cpp index 3d321bf3810..11fec0298ac 100644 --- a/src/mongo/util/net/socket_utils.cpp +++ b/src/mongo/util/net/socket_utils.cpp @@ -71,9 +71,9 @@ const struct WinsockInit { WSADATA d; if (WSAStartup(MAKEWORD(2, 2), &d) != 0) { LOGV2(23201, - "ERROR: wsastartup failed {error}", + "ERROR: wsastartup failed {errnoWithDescription}", "ERROR: wsastartup failed", - "error"_attr = errnoWithDescription()); + "errnoWithDescription"_attr = errnoWithDescription()); quickExit(EXIT_NTSERVICE_ERROR); } } @@ -119,9 +119,9 @@ void setSocketKeepAliveParams(int sock, return val ? (val.get() / 1000) : default_value; } LOGV2_ERROR(23203, - "can't get KeepAlive parameter: {error}", - "Can't get KeepAlive parameter", - "error"_attr = withval.getStatus()); + "can't get KeepAlive parameter: {status}", + "can't get KeepAlive parameter", + "status"_attr = withval.getStatus()); return default_value; }; @@ -145,7 +145,7 @@ void setSocketKeepAliveParams(int sock, nullptr)) { LOGV2_ERROR(23204, "failed setting keepalive values: {error}", - "Failed setting keepalive values", + "failed setting keepalive values", "error"_attr = WSAGetLastError()); } } @@ -157,20 +157,18 @@ void setSocketKeepAliveParams(int sock, if (getsockopt(sock, level, optnum, (char*)&optval, &len)) { LOGV2_ERROR(23205, - "can't get {optname}: {error}", - "Can't get socket option", + "can't get {optname}: {errnoWithDescription}", "optname"_attr = optname, - "error"_attr = errnoWithDescription()); + "errnoWithDescription"_attr = errnoWithDescription()); } if (optval > maxval) { optval = maxval; if (setsockopt(sock, level, optnum, (char*)&optval, sizeof(optval))) { LOGV2_ERROR(23206, - "can't set {optname}: {error}", - "Can't set socket option", + "can't set {optname}: {errnoWithDescription}", "optname"_attr = optname, - "error"_attr = errnoWithDescription()); + "errnoWithDescription"_attr = errnoWithDescription()); } } }; @@ -215,9 +213,9 @@ std::string getHostName() { int ec = gethostname(buf, 127); if (ec || *buf == 0) { LOGV2(23202, - "can't get this server's hostname {error}", - "Can't get this server's hostname", - "error"_attr = errnoWithDescription()); + "can't get this server's hostname {errnoWithDescription}", + "can't get this server's hostname", + "errnoWithDescription"_attr = errnoWithDescription()); return ""; } return buf; |