diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 6024b6e1..74dd18c5 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -1807,10 +1807,8 @@ int Http2Session::write_noop() { return 0; } int Http2Session::connected() { if (!util::check_socket_connected(conn_.fd)) { - if (LOG_ENABLED(INFO)) { - SSLOG(INFO, this) << "Backend connect failed; addr=" - << util::to_numeric_addr(&addr_->addr); - } + SSLOG(WARN, this) << "Backend connect failed; addr=" + << util::to_numeric_addr(&addr_->addr); downstream_failure(addr_); @@ -2212,6 +2210,9 @@ void Http2Session::on_timeout() { break; } case CONNECTING: { + SSLOG(WARN, this) << "Connect time out; addr=" + << util::to_numeric_addr(&addr_->addr); + downstream_failure(addr_); break; } diff --git a/src/shrpx_http_downstream_connection.cc b/src/shrpx_http_downstream_connection.cc index deb3c7e0..da1c6fd0 100644 --- a/src/shrpx_http_downstream_connection.cc +++ b/src/shrpx_http_downstream_connection.cc @@ -70,12 +70,12 @@ namespace { void connect_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) { auto conn = static_cast(w->data); auto dconn = static_cast(conn->data); + auto addr = dconn->get_addr(); - if (LOG_ENABLED(INFO)) { - DCLOG(INFO, dconn) << "Connect time out"; - } + DCLOG(WARN, dconn) << "Connect time out; addr=" + << util::to_numeric_addr(&addr->addr); - downstream_failure(dconn->get_addr()); + downstream_failure(addr); auto downstream = dconn->get_downstream(); auto upstream = downstream->get_upstream(); @@ -1144,10 +1144,8 @@ int HttpDownstreamConnection::connected() { if (!util::check_socket_connected(conn_.fd)) { conn_.wlimit.stopw(); - if (LOG_ENABLED(INFO)) { - DCLOG(INFO, this) << "Backend connect failed; addr=" - << util::to_numeric_addr(&addr_->addr); - } + DCLOG(WARN, this) << "Backend connect failed; addr=" + << util::to_numeric_addr(&addr_->addr); downstream_failure(addr_);