1
0
Fork 0

More logging in AgencyComm.

This commit is contained in:
Max Neunhoeffer 2016-10-14 09:55:27 +02:00
parent 46fa78508e
commit 8c7034e249
1 changed files with 9 additions and 1 deletions

View File

@ -1605,6 +1605,7 @@ AgencyCommResult AgencyComm::sendWithFailover(
AgencyCommResult result;
result._statusCode = 400;
result._message = "No endpoints for agency found.";
LOG_TOPIC(ERR, Logger::AGENCYCOMM) << "No endpoints for agency found.";
return result;
}
}
@ -1624,7 +1625,7 @@ AgencyCommResult AgencyComm::sendWithFailover(
if (tries > 1) { // not the first try
LOG_TOPIC(WARN, Logger::AGENCYCOMM) << "Retrying agency communication at "
<< agencyEndpoint->_endpoint->specification();
<< agencyEndpoint->_endpoint->specification() << " tries: " << tries;
}
try {
@ -1728,6 +1729,13 @@ AgencyCommResult AgencyComm::sendWithFailover(
// otherwise, try next
}
if (!result.successful()) {
LOG_TOPIC(ERR, Logger::AGENCYCOMM) << "Unsuccessful AgencyComm: "
<< "errorCode : " << result.errorCode()
<< "errorMessage: " << result.errorMessage()
<< "errorDetails: " << result.errorDetails();
}
return result;
}