From f10da6b60e9e715e9eb05b7a39886a6443971657 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Fri, 16 Mar 2018 18:04:48 +0200
Subject: [PATCH] MAINT-8399 fixed unnessesary spam and made message more
 informative

---
 indra/newview/llmeshrepository.cpp | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index f1c2234677d..71a161198aa 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1118,19 +1118,27 @@ void LLMeshRepoThread::constructUrl(LLUUID mesh_id, std::string * url)
 	
 	if (gAgent.getRegion())
 	{
-		LLMutexLock lock(mMutex);
-        res_url = mGetMeshCapability;
-	}
+		{
+			LLMutexLock lock(mMutex);
+			res_url = mGetMeshCapability;
+		}
 
-	if (! res_url.empty())
-	{
-		res_url += "/?mesh_id=";
-		res_url += mesh_id.asString().c_str();
+		if (!res_url.empty())
+		{
+			res_url += "/?mesh_id=";
+			res_url += mesh_id.asString().c_str();
+		}
+		else
+		{
+			LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset capability!  Cannot load meshes. Region id: "
+									<< gAgent.getRegion()->getRegionID() << LL_ENDL;
+			LL_DEBUGS_ONCE(LOG_MESH) << "Cannot load mesh " << mesh_id << " due to missing capability." << LL_ENDL;
+		}
 	}
 	else
 	{
-		LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset capability!  Cannot load "
-								<< mesh_id << ".mesh" << LL_ENDL;
+		LL_WARNS_ONCE(LOG_MESH) << "Current region is not loaded so there is no capability to load from! Cannot load meshes." << LL_ENDL;
+		LL_DEBUGS_ONCE(LOG_MESH) << "Cannot load mesh " << mesh_id << " due to missing capability." << LL_ENDL;
 	}
 
 	*url = res_url;
-- 
GitLab