Commit 41b2745d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Log backend connection failure in WARN level

parent 30f9f9ef
......@@ -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;
}
......
......@@ -70,12 +70,12 @@ namespace {
void connect_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
auto conn = static_cast<Connection *>(w->data);
auto dconn = static_cast<HttpDownstreamConnection *>(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_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment