Improve log message for connecting nodes without configured Endpoint object

fixes #12194
This commit is contained in:
Michael Friedrich 2016-07-21 13:48:00 +02:00
parent e9605168a1
commit 2d53cdb845
1 changed files with 11 additions and 4 deletions

View File

@ -354,12 +354,19 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri
}
}
Log(LogInformation, "ApiListener")
<< "New client connection for identity '" << identity << "'"
<< (verify_ok ? "" : " (client certificate not signed by CA)");
if (verify_ok)
endpoint = Endpoint::GetByName(identity);
{
Log log(LogInformation, "ApiListener");
log << "New client connection for identity '" << identity << "'";
if (!verify_ok)
log << " (client certificate not signed by CA)";
else if (!endpoint)
log << " (no Endpoint object found for identity)";
}
} else {
Log(LogInformation, "ApiListener")
<< "New client connection (no client certificate)";