From 001ce95e4c4bf4f0929c2ced4ab22e3bc40fd1d6 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 13 Feb 2008 03:38:18 +0000 Subject: Clean up more unnecessary String.Format calls --- .../Communications/Cache/AgentAssetTransactions.cs | 7 +++---- OpenSim/Framework/Communications/Cache/AssetCache.cs | 4 +--- .../Framework/Communications/Cache/AssetServerBase.cs | 9 +++------ .../Framework/Communications/Cache/LibraryRootFolder.cs | 16 ++++++---------- .../Communications/Cache/UserProfileCacheService.cs | 13 +++++-------- 5 files changed, 18 insertions(+), 31 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache') diff --git a/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs index d40c354..3882ade 100644 --- a/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs @@ -113,10 +113,9 @@ namespace OpenSim.Framework.Communications.Cache // [or maybe we can if we do more checking like data lenght checks] if (uploaderFound != null) { -// m_log.Info( -// String.Format( -// "[ASSET TRANSACTIONS] Removing asset xfer uploader with transfer id {0}, transaction {1}", -// xferID, uploaderFound.TransactionID)); +// m_log.InfoFormat( +// "[ASSET TRANSACTIONS] Removing asset xfer uploader with transfer id {0}, transaction {1}", +// xferID, uploaderFound.TransactionID); // XferUploaders.Remove(uploaderFound.TransactionID); diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 2b06d4f..effaa82 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -266,9 +266,7 @@ namespace OpenSim.Framework.Communications.Cache } } while (--maxPolls > 0); - m_log.Warn( - String.Format("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached", assetID.ToString()) - ); + m_log.WarnFormat("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached", assetID.ToString()); return null; } diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 6cded49..6820027 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -70,15 +70,13 @@ namespace OpenSim.Framework.Communications.Cache if (asset != null) { - //m_log.Info( - // String.Format("[ASSET]: Asset {0} received from asset server", req.AssetID)); + //m_log.InfoFormat("[ASSET]: Asset {0} received from asset server", req.AssetID); m_receiver.AssetReceived(asset, req.IsTexture); } else { - m_log.Error( - String.Format("[ASSET]: Asset {0} not found by asset server", req.AssetID)); + m_log.ErrorFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID); m_receiver.AssetNotFound(req.AssetID); } @@ -93,7 +91,6 @@ namespace OpenSim.Framework.Communications.Cache CommitAssets(); } - public AssetServerBase() { m_log.Info("[ASSETSERVER]: Starting asset storage system"); @@ -163,4 +160,4 @@ namespace OpenSim.Framework.Communications.Cache { } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index 604cd2c..b3d3c7c 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs @@ -140,9 +140,8 @@ namespace OpenSim.Framework.Communications.Cache /// protected void LoadLibraries(string librariesControlPath) { - m_log.Info( - String.Format( - "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath)); + m_log.InfoFormat( + "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath); LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); } @@ -188,9 +187,8 @@ namespace OpenSim.Framework.Communications.Cache libraryFolders.Add(folderInfo.folderID, folderInfo); parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); - -// m_log.Info( -// String.Format("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID)); + +// m_log.InfoFormat("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID); } else { @@ -258,14 +256,12 @@ namespace OpenSim.Framework.Communications.Cache } catch (XmlException e) { - m_log.Error( - String.Format("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e)); + m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e); } } else { - m_log.Error( - String.Format("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path)); + m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path); } } diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 257747b..455f722 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -233,28 +233,25 @@ namespace OpenSim.Framework.Communications.Cache } else { - m_log.Error( - String.Format("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name)); + m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name); return; } } else { - m_log.Error( - String.Format("[INVENTORYCACHE]: " + + m_log.ErrorFormat("[INVENTORYCACHE]: " + "Could not find user profile for {0} for folder {1}", - remoteClient.Name, folderID)); + remoteClient.Name, folderID); return; } // If we've reached this point then we couldn't find the folder, even though the client thinks // it exists - m_log.Error( - String.Format("[INVENTORYCACHE]: " + + m_log.ErrorFormat("[INVENTORYCACHE]: " + "Could not find folder {0} for user {1}", - folderID, remoteClient.Name)); + folderID, remoteClient.Name); } public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) -- cgit v1.1