summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-28 23:30:07 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-28 23:30:27 +0200
commitb36082170e89c40b73e536a2ab8b2dcbe4220806 (patch)
tree8f064110084544ac698395520c9435e3ed6ed1ad
parent9fc3014435aac812754f0d47b53c87526513113e (diff)
SL-14767 Expanded logging to be a bit more informative
-rw-r--r--indra/llmessage/llavatarnamecache.cpp50
1 files changed, 31 insertions, 19 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index fbd65cc67b..72db7e816a 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -145,10 +145,10 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU
}
LLSD httpResults;
+ bool success = true;
try
{
- bool success = true;
LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", sHttpPolicy);
LLSD results = httpAdapter.getAndSuspend(sHttpRequest, url);
@@ -163,35 +163,47 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU
else
{
httpResults = results["http_result"];
- success = httpResults["success"].asBoolean();
- if (!success)
+ if (!httpResults.isMap())
{
- LL_WARNS("AvNameCache") << "Error result from LLCoreHttpUtil::HttpCoroHandler. Code "
- << httpResults["status"] << ": '" << httpResults["message"] << "'" << LL_ENDL;
+ success = false;
+ LL_WARNS("AvNameCache") << " Invalid http_result returned from LLCoreHttpUtil::HttpCoroHandler." << LL_ENDL;
}
- }
-
- if (!success)
- { // on any sort of failure add dummy records for any agent IDs
- // in this request that we do not have cached already
- std::vector<LLUUID>::const_iterator it = agentIds.begin();
- for ( ; it != agentIds.end(); ++it)
+ else
{
- const LLUUID& agent_id = *it;
- LLAvatarNameCache::getInstance()->handleAgentError(agent_id);
+ success = httpResults["success"].asBoolean();
+ if (!success)
+ {
+ LL_WARNS("AvNameCache") << "Error result from LLCoreHttpUtil::HttpCoroHandler. Code "
+ << httpResults["status"] << ": '" << httpResults["message"] << "'" << LL_ENDL;
+ }
}
- return;
}
- LLAvatarNameCache::getInstance()->handleAvNameCacheSuccess(results, httpResults);
+ if (LLAvatarNameCache::instanceExists())
+ {
+ if (!success)
+ { // on any sort of failure add dummy records for any agent IDs
+ // in this request that we do not have cached already
+ std::vector<LLUUID>::const_iterator it = agentIds.begin();
+ for (; it != agentIds.end(); ++it)
+ {
+ const LLUUID& agent_id = *it;
+ LLAvatarNameCache::getInstance()->handleAgentError(agent_id);
+ }
+ return;
+ }
+ LLAvatarNameCache::getInstance()->handleAvNameCacheSuccess(results, httpResults);
+ }
}
catch (...)
{
LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << LLCoros::getName()
- << "('" << url << "', " << agentIds.size()
- << " http result: " << httpResults.asString()
- << " Agent Ids)"));
+ << "('" << url << "', "
+ << agentIds.size() << "Agent Ids,"
+ << " http result: " << S32(success)
+ << " has response: " << S32(httpResults.size())
+ << ")"));
throw;
}
}