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 +- .../Framework/Communications/Cache/AssetCache.cs | 4 +- .../Communications/Cache/AssetServerBase.cs | 9 +-- .../Communications/Cache/LibraryRootFolder.cs | 16 ++--- .../Cache/UserProfileCacheService.cs | 13 ++-- .../Framework/Communications/Capabilities/Caps.cs | 21 +++--- .../Communications/InventoryServiceBase.cs | 5 +- OpenSim/Framework/Communications/LoginService.cs | 6 +- .../Data.MySQL/Resources/AvatarAppearance.sql | 84 +++++++++++----------- 9 files changed, 73 insertions(+), 92 deletions(-) (limited to 'OpenSim/Framework') 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) diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 1398184..a360dc3 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -305,10 +305,9 @@ namespace OpenSim.Region.Capabilities uploadResponse.uploader = uploaderURL; uploadResponse.state = "upload"; -// m_log.Info( -// String.Format("[CAPS]: " + -// "ScriptTaskInventory response: {0}", -// LLSDHelpers.SerialiseLLSDReply(uploadResponse))); +// m_log.InfoFormat("[CAPS]: " + +// "ScriptTaskInventory response: {0}", +// LLSDHelpers.SerialiseLLSDReply(uploadResponse))); return LLSDHelpers.SerialiseLLSDReply(uploadResponse); } @@ -351,10 +350,9 @@ namespace OpenSim.Region.Capabilities uploadResponse.uploader = uploaderURL; uploadResponse.state = "upload"; -// m_log.Info( -// String.Format("[CAPS]: " + -// "NoteCardAgentInventory response: {0}", -// LLSDHelpers.SerialiseLLSDReply(uploadResponse))); +// m_log.InfoFormat("[CAPS]: " + +// "NoteCardAgentInventory response: {0}", +// LLSDHelpers.SerialiseLLSDReply(uploadResponse))); return LLSDHelpers.SerialiseLLSDReply(uploadResponse); } @@ -683,10 +681,9 @@ namespace OpenSim.Region.Capabilities { try { -// m_log.Info( -// String.Format("[CAPS]: " + -// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", -// data, path, param)); +// m_log.InfoFormat("[CAPS]: " + +// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", +// data, path, param)); string res = String.Empty; LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index fd9ab1b..74c07e1 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -147,10 +147,9 @@ namespace OpenSim.Framework.Communications if (null != existingRootFolder) { - m_log.Error( - String.Format("[AGENTINVENTORY]: " + + m_log.ErrorFormat("[AGENTINVENTORY]: " + "Did not create a new inventory for user {0} since they already have " - + "a root inventory folder with id {1}", user, existingRootFolder)); + + "a root inventory folder with id {1}", user, existingRootFolder); } else { diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index db86a97..e14eccf 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -601,8 +601,7 @@ namespace OpenSim.Framework.UserManagement public virtual bool AuthenticateUser(UserProfileData profile, string password) { bool passwordSuccess = false; - m_log.Info( - String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID)); + m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); // Web Login method seems to also occasionally send the hashed password itself @@ -627,8 +626,7 @@ namespace OpenSim.Framework.UserManagement public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) { bool passwordSuccess = false; - m_log.Info( - String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID)); + m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); // Match web login key unless it's the default weblogin key LLUUID.Zero passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero); diff --git a/OpenSim/Framework/Data.MySQL/Resources/AvatarAppearance.sql b/OpenSim/Framework/Data.MySQL/Resources/AvatarAppearance.sql index d9d3de0..b638ee2 100644 --- a/OpenSim/Framework/Data.MySQL/Resources/AvatarAppearance.sql +++ b/OpenSim/Framework/Data.MySQL/Resources/AvatarAppearance.sql @@ -1,42 +1,42 @@ --- --- Create schema avatar_appearance --- - -CREATE DATABASE IF NOT EXISTS avatar_appearance; -USE avatar_appearance; - -DROP TABLE IF EXISTS `avatarappearance`; -CREATE TABLE `avatarappearance` ( - `UUID` char(36) NOT NULL, - `Serial` int(10) unsigned NOT NULL, - `WearableItem0` char(36) NOT NULL, - `WearableAsset0` char(36) NOT NULL, - `WearableItem1` char(36) NOT NULL, - `WearableAsset1` char(36) NOT NULL, - `WearableItem2` char(36) NOT NULL, - `WearableAsset2` char(36) NOT NULL, - `WearableItem3` char(36) NOT NULL, - `WearableAsset3` char(36) NOT NULL, - `WearableItem4` char(36) NOT NULL, - `WearableAsset4` char(36) NOT NULL, - `WearableItem5` char(36) NOT NULL, - `WearableAsset5` char(36) NOT NULL, - `WearableItem6` char(36) NOT NULL, - `WearableAsset6` char(36) NOT NULL, - `WearableItem7` char(36) NOT NULL, - `WearableAsset7` char(36) NOT NULL, - `WearableItem8` char(36) NOT NULL, - `WearableAsset8` char(36) NOT NULL, - `WearableItem9` char(36) NOT NULL, - `WearableAsset9` char(36) NOT NULL, - `WearableItem10` char(36) NOT NULL, - `WearableAsset10` char(36) NOT NULL, - `WearableItem11` char(36) NOT NULL, - `WearableAsset11` char(36) NOT NULL, - `WearableItem12` char(36) NOT NULL, - `WearableAsset12` char(36) NOT NULL, - - - PRIMARY KEY (`UUID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - +-- +-- Create schema avatar_appearance +-- + +CREATE DATABASE IF NOT EXISTS avatar_appearance; +USE avatar_appearance; + +DROP TABLE IF EXISTS `avatarappearance`; +CREATE TABLE `avatarappearance` ( + `UUID` char(36) NOT NULL, + `Serial` int(10) unsigned NOT NULL, + `WearableItem0` char(36) NOT NULL, + `WearableAsset0` char(36) NOT NULL, + `WearableItem1` char(36) NOT NULL, + `WearableAsset1` char(36) NOT NULL, + `WearableItem2` char(36) NOT NULL, + `WearableAsset2` char(36) NOT NULL, + `WearableItem3` char(36) NOT NULL, + `WearableAsset3` char(36) NOT NULL, + `WearableItem4` char(36) NOT NULL, + `WearableAsset4` char(36) NOT NULL, + `WearableItem5` char(36) NOT NULL, + `WearableAsset5` char(36) NOT NULL, + `WearableItem6` char(36) NOT NULL, + `WearableAsset6` char(36) NOT NULL, + `WearableItem7` char(36) NOT NULL, + `WearableAsset7` char(36) NOT NULL, + `WearableItem8` char(36) NOT NULL, + `WearableAsset8` char(36) NOT NULL, + `WearableItem9` char(36) NOT NULL, + `WearableAsset9` char(36) NOT NULL, + `WearableItem10` char(36) NOT NULL, + `WearableAsset10` char(36) NOT NULL, + `WearableItem11` char(36) NOT NULL, + `WearableAsset11` char(36) NOT NULL, + `WearableItem12` char(36) NOT NULL, + `WearableAsset12` char(36) NOT NULL, + + + PRIMARY KEY (`UUID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- cgit v1.1