From e207284fefa60637e35405ebc87e5e151bd2eabd Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 10 Feb 2008 01:57:59 +0000 Subject: Clean up logging calls using String.Format explicitly --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 6 +++--- OpenSim/Framework/Communications/Cache/AssetServerBase.cs | 2 +- OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | 2 +- OpenSim/Framework/Communications/Cache/AssetTransactions.cs | 2 +- OpenSim/Framework/Communications/Cache/GridAssetClient.cs | 6 +++--- OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 2 +- OpenSim/Framework/Communications/Capabilities/Caps.cs | 4 ++-- OpenSim/Framework/Communications/RestClient/RestClient.cs | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index e81a581..2b06d4f 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -335,7 +335,7 @@ namespace OpenSim.Framework.Communications.Cache } } - m_log.Info(String.Format("[ASSETCACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result)); + m_log.InfoFormat("[ASSETCACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); } public void DeleteAsset(LLUUID assetID) @@ -431,7 +431,7 @@ namespace OpenSim.Framework.Communications.Cache { //if (this.RequestedTextures.ContainsKey(assetID)) //{ - // m_log.Warn(String.Format("[ASSET CACHE]: sending image not found for {0}", assetID)); + // m_log.WarnFormat("[ASSET CACHE]: sending image not found for {0}", assetID); // AssetRequest req = this.RequestedTextures[assetID]; // ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); // notFound.ImageID.ID = assetID; @@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Cache //} //else //{ - // m_log.Error(String.Format("[ASSET CACHE]: Cound not send image not found for {0}", assetID)); + // m_log.ErrorFormat("[ASSET CACHE]: Cound not send image not found for {0}", assetID); //} } diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 1d8f6ba..6cded49 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -133,7 +133,7 @@ namespace OpenSim.Framework.Communications.Cache req.IsTexture = isTexture; m_assetRequests.Enqueue(req); - m_log.Info(String.Format("[ASSET]: Added {0} to request queue", assetID)); + m_log.InfoFormat("[ASSET]: Added {0} to request queue", assetID); } public virtual void UpdateAsset(AssetBase asset) diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs index 33681fd..e78e209 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs @@ -106,7 +106,7 @@ namespace OpenSim.Framework.Communications.Cache // XXX Weak ass way of doing this by directly manipulating this public dictionary, purely temporary transactions.XferUploaders.Remove(uploader.TransactionID); - //m_log.Info(String.Format("[ASSET TRANSACTIONS] Current uploaders: {0}", transactions.XferUploaders.Count)); + //m_log.InfoFormat("[ASSET TRANSACTIONS] Current uploaders: {0}", transactions.XferUploaders.Count); } } } diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index 3799510..da10f85 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs @@ -115,7 +115,7 @@ namespace OpenSim.Framework.Communications.Cache XferUploaders.Remove(uploaderFound.TransactionID); - //m_log.Info(String.Format("[ASSET TRANSACTIONS] Current uploaders: {0}", XferUploaders.Count)); + //m_log.InfoFormat("[ASSET TRANSACTIONS] Current uploaders: {0}", XferUploaders.Count); } } } diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 48d9ec8..8114eb0 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs @@ -52,7 +52,7 @@ namespace OpenSim.Framework.Communications.Cache Stream s = null; try { - m_log.Debug(String.Format("[ASSETCACHE]: Querying for {0}", req.AssetID.ToString())); + m_log.DebugFormat("[ASSETCACHE]: Querying for {0}", req.AssetID.ToString()); RestClient rc = new RestClient(_assetServerUrl); rc.AddResourcePath("assets"); @@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Cache catch (Exception e) { m_log.Error("[ASSETCACHE]: " + e.Message); - m_log.Debug(String.Format("[ASSETCACHE]: Getting asset {0}", req.AssetID.ToString())); + m_log.DebugFormat("[ASSETCACHE]: Getting asset {0}", req.AssetID.ToString()); m_log.Error("[ASSETCACHE]: " + e.StackTrace); } @@ -100,7 +100,7 @@ namespace OpenSim.Framework.Communications.Cache // rc.RequestMethod = "POST"; // rc.Request(s); - //m_log.Info(String.Format("[ASSET]: Stored {0}", rc)); + //m_log.InfoFormat("[ASSET]: Stored {0}", rc); m_log.Info("[ASSET]: Sending to " + _assetServerUrl + "/assets/"); RestObjectPoster.BeginPostObject(_assetServerUrl + "/assets/", asset); diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 79c0c86..e9765a7 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Cache } else { - m_log.Error(String.Format("[USERCACHE]: User profile for user {0} not found", userID)); + m_log.ErrorFormat("[USERCACHE]: User profile for user {0} not found", userID); } } } diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 6473c26..1398184 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -277,7 +277,7 @@ namespace OpenSim.Region.Capabilities { try { -// m_log.Debug(String.Format("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param)); +// m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); @@ -709,7 +709,7 @@ namespace OpenSim.Region.Capabilities SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); } -// m_log.Info(String.Format("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res)); +// m_log.InfoFormat("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res); return res; } diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs index f968c9a..bf81565 100644 --- a/OpenSim/Framework/Communications/RestClient/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs @@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications } } realuri = sb.ToString(); - m_log.Info(String.Format("[REST]: RestURL: {0}", realuri)); + m_log.InfoFormat("[REST]: RestURL: {0}", realuri); return new Uri(sb.ToString()); } @@ -376,8 +376,8 @@ namespace OpenSim.Framework.Communications _asyncException = null; _request.ContentLength = src.Length; - m_log.Info(String.Format("[REST]: Request Length {0}", _request.ContentLength)); - m_log.Info(String.Format("[REST]: Sending Web Request {0}", buildUri())); + m_log.InfoFormat("[REST]: Request Length {0}", _request.ContentLength); + m_log.InfoFormat("[REST]: Sending Web Request {0}", buildUri()); src.Seek(0, SeekOrigin.Begin); m_log.Info("[REST]: Seek is ok"); Stream dst = _request.GetRequestStream(); -- cgit v1.1