summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarrenderinfoaccountant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavatarrenderinfoaccountant.cpp')
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp119
1 files changed, 54 insertions, 65 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index ca2674bf94..83ae0438d9 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -70,14 +70,14 @@ public:
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
- LL_WARNS() << "HTTP error result for avatar weight GET: " << statusNum
+ LL_WARNS("AvatarRenderInfo") << "HTTP error result for avatar weight GET: " << statusNum
<< ", " << reason
<< " returned by region " << regionp->getName()
<< LL_ENDL;
}
else
{
- LL_WARNS() << "Avatar render weight GET error recieved but region not found for "
+ LL_WARNS("AvatarRenderInfo") << "Avatar render weight GET error recieved but region not found for "
<< mRegionHandle
<< ", error " << statusNum
<< ", " << reason
@@ -91,10 +91,7 @@ public:
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
- if (LLAvatarRenderInfoAccountant::logRenderInfo())
- {
- LL_INFOS() << "LRI: Result for avatar weights request for region " << regionp->getName() << ":" << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Result for avatar weights request for region '" << regionp->getName() << "':" << LL_ENDL;
if (content.isMap())
{
@@ -109,40 +106,57 @@ public:
LLUUID target_agent_id = LLUUID(report_iter->first);
const LLSD & agent_info_map = report_iter->second;
LLViewerObject* avatarp = gObjectList.findObject(target_agent_id);
- if (avatarp &&
- avatarp->isAvatar() &&
- agent_info_map.isMap())
+ if ( avatarp
+ && avatarp->isAvatar()
+ && agent_info_map.isMap())
{ // Extract the data for this avatar
- if (LLAvatarRenderInfoAccountant::logRenderInfo())
- {
- LL_INFOS() << "LRI: Agent " << target_agent_id
- << ": " << agent_info_map << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Agent " << target_agent_id
+ << ": " << agent_info_map << LL_ENDL;
if (agent_info_map.has(KEY_WEIGHT))
{
((LLVOAvatar *) avatarp)->setReportedVisualComplexity(agent_info_map[KEY_WEIGHT].asInteger());
}
}
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "LRI: agent entry invalid"
+ << " agent " << target_agent_id
+ << " map " << agent_info_map
+ << LL_ENDL;
+ }
report_iter++;
}
}
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "LRI: malformed get response agents content is not map" << LL_ENDL;
+ }
+
} // has "agents"
else if (content.has(KEY_ERROR))
{
const LLSD & error = content[KEY_ERROR];
- LL_WARNS() << "Avatar render info GET error: "
+ LL_WARNS("AvatarRenderInfo") << "Avatar render info GET error: "
<< error[KEY_IDENTIFIER]
<< ": " << error[KEY_MESSAGE]
<< " from region " << regionp->getName()
<< LL_ENDL;
}
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "LRI: no agent key in get response" << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "LRI: malformed get response is not map" << LL_ENDL;
}
}
else
{
- LL_INFOS() << "Avatar render weight info recieved but region not found for "
+ LL_WARNS("AvatarRenderInfo") << "Avatar render weight info recieved but region not found for "
<< mRegionHandle << LL_ENDL;
}
}
@@ -165,14 +179,14 @@ public:
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
- LL_WARNS() << "HTTP error result for avatar weight POST: " << statusNum
+ LL_WARNS("AvatarRenderInfo") << "HTTP error result for avatar weight POST: " << statusNum
<< ", " << reason
<< " returned by region " << regionp->getName()
<< LL_ENDL;
}
else
{
- LL_WARNS() << "Avatar render weight POST error recieved but region not found for "
+ LL_WARNS("AvatarRenderInfo") << "Avatar render weight POST error recieved but region not found for "
<< mRegionHandle
<< ", error " << statusNum
<< ", " << reason
@@ -185,18 +199,15 @@ public:
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
- if (LLAvatarRenderInfoAccountant::logRenderInfo())
- {
- LL_INFOS() << "LRI: Result for avatar weights POST for region " << regionp->getName()
- << ": " << content << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Result for avatar weights POST for region " << regionp->getName()
+ << ": " << content << LL_ENDL;
if (content.isMap())
{
if (content.has(KEY_ERROR))
{
const LLSD & error = content[KEY_ERROR];
- LL_WARNS() << "Avatar render info POST error: "
+ LL_WARNS("AvatarRenderInfo") << "Avatar render info POST error: "
<< error[KEY_IDENTIFIER]
<< ": " << error[KEY_MESSAGE]
<< " from region " << regionp->getName()
@@ -206,7 +217,7 @@ public:
}
else
{
- LL_INFOS() << "Avatar render weight POST result recieved but region not found for "
+ LL_INFOS("AvatarRenderInfo") << "Avatar render weight POST result recieved but region not found for "
<< mRegionHandle << LL_ENDL;
}
}
@@ -223,13 +234,10 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
std::string url = regionp->getCapability("AvatarRenderInfo");
if (!url.empty())
{
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Sending avatar render info to region "
- << regionp->getName()
- << " from " << url
- << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Checking for avatar render info to send to region "
+ << regionp->getName()
+ << " from " << url
+ << LL_ENDL;
// Build the render info to POST to the region
LLSD report = LLSD::emptyMap();
@@ -252,14 +260,8 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
info[KEY_WEIGHT] = avatar->getVisualComplexity();
agents[avatar->getID().asString()] = info;
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Sending avatar render info for " << avatar->getID()
- << ": " << info << LL_ENDL;
- LL_INFOS() << "LRI: other info geometry " << avatar->getAttachmentGeometryBytes()
- << ", area " << avatar->getAttachmentSurfaceArea()
- << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Sending avatar render info for " << avatar->getID()
+ << ": " << info << LL_ENDL;
}
}
iter++;
@@ -268,6 +270,9 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
report[KEY_AGENTS] = agents;
if (agents.size() > 0)
{
+ LL_INFOS("AvatarRenderInfo") << "LRI: Sending info for " << agents.size()
+ << " avatars to region " << regionp->getName()
+ << LL_ENDL;
LLHTTPClient::post(url, report, new LLAvatarRenderInfoPostResponder(regionp->getHandle()));
}
}
@@ -283,13 +288,10 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
std::string url = regionp->getCapability("AvatarRenderInfo");
if (!url.empty())
{
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Requesting avatar render info for region "
- << regionp->getName()
- << " from " << url
- << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Requesting avatar render info for region "
+ << regionp->getName()
+ << " from " << url
+ << LL_ENDL;
// First send a request to get the latest data
LLHTTPClient::get(url, new LLAvatarRenderInfoGetResponder(regionp->getHandle()));
@@ -308,11 +310,8 @@ void LLAvatarRenderInfoAccountant::idle()
S32 num_avs = LLCharacter::sInstances.size();
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Scanning all regions and checking for render info updates"
- << LL_ENDL;
- }
+ LL_DEBUGS("AvatarRenderInfo") << "LRI: Scanning all regions and checking for render info updates"
+ << LL_ENDL;
// Check all regions and see if it's time to fetch/send data
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
@@ -344,12 +343,9 @@ void LLAvatarRenderInfoAccountant::idle()
// are returned for a new LLViewerRegion, and is the earliest time to get render info
void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& region_id)
{
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Viewer has new region capabilities, clearing global render info timer"
- << " and timer for region " << region_id
- << LL_ENDL;
- }
+ LL_INFOS("AvatarRenderInfo") << "LRI: Viewer has new region capabilities, clearing global render info timer"
+ << " and timer for region " << region_id
+ << LL_ENDL;
// Reset the global timer so it will scan regions immediately
sRenderInfoReportTimer.reset();
@@ -360,10 +356,3 @@ void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& reg
regionp->getRenderInfoRequestTimer().reset();
}
}
-
-// static
-bool LLAvatarRenderInfoAccountant::logRenderInfo()
-{
- static LLCachedControl<bool> render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging", false);
- return render_mute_logging_enabled;
-}