aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-22 22:54:50 +0000
committerJustin Clarke Casey2008-02-22 22:54:50 +0000
commitfed46ba6a72b5df424909cbc8eff9c6134da3ac1 (patch)
treeb6e7685c5c71da91d83b9837bdc0c8665d59faed /OpenSim
parentScriptEngine works again (startup-nully-error gone) (diff)
downloadopensim-SC_OLD-fed46ba6a72b5df424909cbc8eff9c6134da3ac1.zip
opensim-SC_OLD-fed46ba6a72b5df424909cbc8eff9c6134da3ac1.tar.gz
opensim-SC_OLD-fed46ba6a72b5df424909cbc8eff9c6134da3ac1.tar.bz2
opensim-SC_OLD-fed46ba6a72b5df424909cbc8eff9c6134da3ac1.tar.xz
* Winnow the debug and info messages associated with stat fetching
* As such, only a request for a non cached asset, the response and failures show up now. * I know lbsa71 only put these in not long ago, so if they are really still required, I think we should think whether we can move the default log4net level off 'Debug'
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs23
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs18
3 files changed, 29 insertions, 14 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 15b52b0..c1f6719 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -250,7 +250,9 @@ namespace OpenSim.Framework.Communications.Cache
250 } 250 }
251 else 251 else
252 { 252 {
253 m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId); 253 #if DEBUG
254 //m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId);
255 #endif
254 256
255 NewAssetRequest req = new NewAssetRequest(assetId, callback); 257 NewAssetRequest req = new NewAssetRequest(assetId, callback);
256 258
@@ -384,14 +386,17 @@ namespace OpenSim.Framework.Communications.Cache
384 } 386 }
385 } 387 }
386 } 388 }
387 389 #if DEBUG
388 m_log.DebugFormat("[ASSET CACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); 390 //m_log.DebugFormat("[ASSET CACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result);
391 #endif
389 } 392 }
390 393
391 // See IAssetReceiver 394 // See IAssetReceiver
392 public void AssetReceived(AssetBase asset, bool IsTexture) 395 public void AssetReceived(AssetBase asset, bool IsTexture)
393 { 396 {
397 #if DEBUG
394 m_log.DebugFormat("[ASSET CACHE]: Recieved {0} [{1}]", IsTexture ? "texture" : "asset", asset.FullID); 398 m_log.DebugFormat("[ASSET CACHE]: Recieved {0} [{1}]", IsTexture ? "texture" : "asset", asset.FullID);
399 #endif
395 400
396 if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server 401 if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server
397 { 402 {
@@ -405,7 +410,9 @@ namespace OpenSim.Framework.Communications.Cache
405 TextureImage image = new TextureImage(asset); 410 TextureImage image = new TextureImage(asset);
406 if (Textures.ContainsKey(image.FullID)) 411 if (Textures.ContainsKey(image.FullID))
407 { 412 {
408 m_log.DebugFormat("[ASSET CACHE]: There's already an texture {0} in memory. Skipping.", asset.FullID); 413 #if DEBUG
414 //m_log.DebugFormat("[ASSET CACHE]: There's already an texture {0} in memory. Skipping.", asset.FullID);
415 #endif
409 } 416 }
410 else 417 else
411 { 418 {
@@ -422,7 +429,9 @@ namespace OpenSim.Framework.Communications.Cache
422 AssetInfo assetInf = new AssetInfo(asset); 429 AssetInfo assetInf = new AssetInfo(asset);
423 if (Assets.ContainsKey(assetInf.FullID)) 430 if (Assets.ContainsKey(assetInf.FullID))
424 { 431 {
425 m_log.DebugFormat("[ASSET CACHE]: There's already an asset {0} in memory. Skipping.", asset.FullID); 432 #if DEBUG
433 //m_log.DebugFormat("[ASSET CACHE]: There's already an asset {0} in memory. Skipping.", asset.FullID);
434 #endif
426 } 435 }
427 else 436 else
428 { 437 {
@@ -435,7 +444,9 @@ namespace OpenSim.Framework.Communications.Cache
435 444
436 if (RequestedAssets.ContainsKey(assetInf.FullID)) 445 if (RequestedAssets.ContainsKey(assetInf.FullID))
437 { 446 {
438 m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID); 447 #if DEBUG
448 //m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID);
449 #endif
439 450
440 AssetRequest req = RequestedAssets[assetInf.FullID]; 451 AssetRequest req = RequestedAssets[assetInf.FullID];
441 req.AssetInf = assetInf; 452 req.AssetInf = assetInf;
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index cae4231..4b5df5c 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -137,7 +137,9 @@ namespace OpenSim.Framework.Communications.Cache
137 req.IsTexture = isTexture; 137 req.IsTexture = isTexture;
138 m_assetRequests.Enqueue(req); 138 m_assetRequests.Enqueue(req);
139 139
140 #if DEBUG
140 m_log.InfoFormat("[ASSET SERVER]: Added {0} to request queue", assetID); 141 m_log.InfoFormat("[ASSET SERVER]: Added {0} to request queue", assetID);
142 #endif
141 } 143 }
142 144
143 public virtual void UpdateAsset(AssetBase asset) 145 public virtual void UpdateAsset(AssetBase asset)
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index 8114eb0..baa6058 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -52,7 +52,9 @@ namespace OpenSim.Framework.Communications.Cache
52 Stream s = null; 52 Stream s = null;
53 try 53 try
54 { 54 {
55 m_log.DebugFormat("[ASSETCACHE]: Querying for {0}", req.AssetID.ToString()); 55 #if DEBUG
56 //m_log.DebugFormat("[GRID ASSET CLIENT]: Querying for {0}", req.AssetID.ToString());
57 #endif
56 58
57 RestClient rc = new RestClient(_assetServerUrl); 59 RestClient rc = new RestClient(_assetServerUrl);
58 rc.AddResourcePath("assets"); 60 rc.AddResourcePath("assets");
@@ -72,9 +74,9 @@ namespace OpenSim.Framework.Communications.Cache
72 } 74 }
73 catch (Exception e) 75 catch (Exception e)
74 { 76 {
75 m_log.Error("[ASSETCACHE]: " + e.Message); 77 m_log.Error("[GRID ASSET CLIENT]: " + e.Message);
76 m_log.DebugFormat("[ASSETCACHE]: Getting asset {0}", req.AssetID.ToString()); 78 m_log.DebugFormat("[GRID ASSET CLIENT]: Getting asset {0}", req.AssetID.ToString());
77 m_log.Error("[ASSETCACHE]: " + e.StackTrace); 79 m_log.Error("[GRID ASSET CLIENT]: " + e.StackTrace);
78 } 80 }
79 81
80 return null; 82 return null;
@@ -95,19 +97,19 @@ namespace OpenSim.Framework.Communications.Cache
95 // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); 97 // XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
96 // xs.Serialize(s, asset); 98 // xs.Serialize(s, asset);
97 // RestClient rc = new RestClient(_assetServerUrl); 99 // RestClient rc = new RestClient(_assetServerUrl);
98 m_log.Info("[ASSET]: Storing asset"); 100 m_log.Info("[GRID ASSET CLIENT]: Storing asset");
99 //rc.AddResourcePath("assets"); 101 //rc.AddResourcePath("assets");
100 102
101 // rc.RequestMethod = "POST"; 103 // rc.RequestMethod = "POST";
102 // rc.Request(s); 104 // rc.Request(s);
103 //m_log.InfoFormat("[ASSET]: Stored {0}", rc); 105 //m_log.InfoFormat("[ASSET]: Stored {0}", rc);
104 m_log.Info("[ASSET]: Sending to " + _assetServerUrl + "/assets/"); 106 m_log.Info("[GRID ASSET CLIENT]: Sending to " + _assetServerUrl + "/assets/");
105 RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset); 107 RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset);
106 108
107 } 109 }
108 catch (Exception e) 110 catch (Exception e)
109 { 111 {
110 m_log.Error("[ASSETS]: " + e.Message); 112 m_log.Error("[GRID ASSET CLIENT]: " + e.Message);
111 } 113 }
112 } 114 }
113 115
@@ -122,4 +124,4 @@ namespace OpenSim.Framework.Communications.Cache
122 124
123 #endregion 125 #endregion
124 } 126 }
125} \ No newline at end of file 127}