Endpoint::Ptr endpoint;
bool verify_ok = false;
+ String conninfo;
+
+ if (role == RoleClient)
+ conninfo = "to";
+ else
+ conninfo = "from";
+
+ conninfo += " " + client->GetPeerAddress();
+
if (cert) {
try {
identity = GetCertificateCN(cert);
{
Log log(LogInformation, "ApiListener");
- log << "New client connection for identity '" << identity << "'";
+ log << "New client connection for identity '" << identity << "' " << conninfo;
if (!verify_ok)
log << " (certificate validation failed: " << tlsStream->GetVerifyError() << ")";
}
} else {
Log(LogInformation, "ApiListener")
- << "New client connection (no client certificate)";
+ << "New client connection " << conninfo << " (no client certificate)";
}
ClientType ctype;