Skip to content

Commit 7e9aa23

Browse files
authored
Cleanup set_connect_fail debug log (#13091)
* Cleanup set_connect_fail debug log * Fix args * Include swoc header explicitly
1 parent 450d3f3 commit 7e9aa23

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

include/proxy/http/HttpTransact.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
#include "proxy/ProxySession.h"
4848
#include "tscore/MgmtDefs.h"
4949

50+
#include "swoc/bwf_ex.h"
51+
5052
#include <cstdint>
5153
#include <cstdio>
5254
#include <string>
@@ -953,7 +955,13 @@ class HttpTransact
953955
if (e != EIO) {
954956
this->cause_of_death_errno = e;
955957
}
956-
Dbg(_dbg_ctl, "Setting upstream connection failure %d to %d", original_connect_result, this->current.server->connect_result);
958+
959+
if (_dbg_ctl.on()) {
960+
std::string buf;
961+
swoc::bwprint(buf, "Setting connect_result {::s} to {::s}", swoc::bwf::Errno(original_connect_result),
962+
swoc::bwf::Errno(this->current.server->connect_result));
963+
Dbg(_dbg_ctl, "%s", buf.c_str());
964+
}
957965
}
958966

959967
MgmtInt

0 commit comments

Comments
 (0)