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 --- .../Filesystem/AssetLoaderFileSystem.cs | 12 ++-- OpenSim/Framework/ClientManager.cs | 4 +- .../Framework/Communications/Cache/AssetCache.cs | 6 +- .../Communications/Cache/AssetServerBase.cs | 2 +- .../Cache/AssetTransactionManager.cs | 2 +- .../Communications/Cache/AssetTransactions.cs | 2 +- .../Communications/Cache/GridAssetClient.cs | 6 +- .../Cache/UserProfileCacheService.cs | 2 +- .../Framework/Communications/Capabilities/Caps.cs | 4 +- .../Communications/RestClient/RestClient.cs | 6 +- OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | 14 ++-- OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 31 +++++---- OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | 17 +++-- OpenSim/Grid/AssetServer/RestService.cs | 14 ++-- OpenSim/Grid/InventoryServer/InventoryManager.cs | 6 +- OpenSim/Grid/UserServer/Main.cs | 4 +- OpenSim/Region/Application/OpenSimMain.cs | 4 +- OpenSim/Region/ClientStack/ClientView.cs | 4 +- .../Communications/OGS1/OGS1InventoryService.cs | 20 +++--- OpenSim/Region/Environment/ModuleLoader.cs | 22 +++---- .../Environment/Modules/TextureDownloadModule.cs | 2 +- .../Modules/UserTextureDownloadService.cs | 4 +- OpenSim/Region/Environment/Scenes/InnerScene.cs | 8 +-- .../Region/Environment/Scenes/Scene.Inventory.cs | 76 +++++++++++----------- OpenSim/Region/Environment/Scenes/Scene.cs | 8 +-- OpenSim/Region/Environment/Scenes/SceneManager.cs | 8 +-- .../Scenes/SceneObjectGroup.Inventory.cs | 64 +++++++++--------- .../Region/Environment/Scenes/SceneObjectGroup.cs | 6 +- .../Scenes/SceneObjectPart.Inventory.cs | 69 +++++++++----------- .../Region/Physics/Manager/PhysicsPluginManager.cs | 2 +- OpenSim/Region/Physics/Manager/PhysicsScene.cs | 8 +-- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 4 +- OpenSim/Region/Physics/Meshing/SimpleHull.cs | 10 +-- .../ScriptEngine/DotNetEngine/ScriptManager.cs | 2 +- .../OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | 2 +- 35 files changed, 222 insertions(+), 233 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 9026331..d1f7044 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs @@ -55,13 +55,13 @@ namespace OpenSim.Framework.AssetLoader.Filesystem if (!String.IsNullOrEmpty(path)) { - m_log.Info(String.Format("[ASSETS]: Loading: [{0}][{1}]", name, path)); + m_log.InfoFormat("[ASSETS]: Loading: [{0}][{1}]", name, path); LoadAsset(asset, isImage, path); } else { - m_log.Info(String.Format("[ASSETS]: Instantiated: [{0}]", name)); + m_log.InfoFormat("[ASSETS]: Instantiated: [{0}]", name); } return asset; @@ -108,7 +108,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem } catch (XmlException e) { - m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e)); + m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); } } else @@ -126,7 +126,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem /// protected void LoadXmlAssetSet(string assetSetPath, List assets) { - m_log.Info(String.Format("[ASSETS]: Loading asset set {0}", assetSetPath)); + m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); if (File.Exists(assetSetPath)) { @@ -152,12 +152,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem } catch (XmlException e) { - m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e)); + m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); } } else { - m_log.Error(String.Format("[ASSETS]: Asset set file {0} does not exist!", assetSetPath)); + m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath); } } } diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 064b82d..51ebc9b 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs @@ -71,9 +71,9 @@ namespace OpenSim.Framework public void Remove(uint id) { - //m_log.Info(String.Format("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count)); + //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count); m_clients.Remove(id); - m_log.Info(String.Format("[CLIENT]: Removed client with code {0}, new client count {1}", id, m_clients.Count)); + m_log.InfoFormat("[CLIENT]: Removed client with code {0}, new client count {1}", id, m_clients.Count); } public void Add(uint id, IClientAPI client) 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(); diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs index f9ef699..0dfe671 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs @@ -100,9 +100,9 @@ namespace OpenSim.Framework.Data.MySQL } catch (Exception e) { - m_log.Error(String.Format( - "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() - + Environment.NewLine + "Attempting reconnection", assetID)); + m_log.ErrorFormat( + "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() + + Environment.NewLine + "Attempting reconnection", assetID); _dbConnection.Reconnect(); } } @@ -139,10 +139,10 @@ namespace OpenSim.Framework.Data.MySQL } catch (Exception e) { - m_log.Error(String.Format( - "[ASSETS]: " + - "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() - + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name)); + m_log.ErrorFormat( + "[ASSETS]: " + + "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() + + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); _dbConnection.Reconnect(); } } diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index e2ea018..fcc7cc1 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs @@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.MySQL public void RemoveObject(LLUUID obj, LLUUID regionUUID) { - m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); + m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); DataTable prims = m_primTable; DataTable shapes = m_shapeTable; @@ -304,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL /// private void LoadItems(SceneObjectPart prim) { - //m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID)); + //m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); DataTable dbItems = m_itemsTable; @@ -318,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL TaskInventoryItem item = buildItem(row); inventory.Add(item); - m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID)); + m_log.InfoFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); } prim.RestoreInventoryItems(inventory); @@ -1216,7 +1216,7 @@ namespace OpenSim.Framework.Data.MySQL if (!persistPrimInventories) return; - m_log.Info(String.Format("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID)); + m_log.InfoFormat("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID); // For now, we're just going to crudely remove all the previous inventory items // no matter whether they have changed or not, and replace them with the current set. @@ -1227,10 +1227,10 @@ namespace OpenSim.Framework.Data.MySQL // repalce with current inventory details foreach (TaskInventoryItem newItem in items) { -// m_log.Info(String.Format( -// "[DATASTORE]: " + -// "Adding item {0}, {1} to prim ID {2}", -// newItem.Name, newItem.ItemID, newItem.ParentPartID)); +// m_log.InfoFormat( +// "[DATASTORE]: " + +// "Adding item {0}, {1} to prim ID {2}", +// newItem.Name, newItem.ItemID, newItem.ParentPartID); DataRow newItemRow = m_itemsTable.NewRow(); fillItemRow(newItemRow, newItem); @@ -1313,7 +1313,6 @@ namespace OpenSim.Framework.Data.MySQL return cmd; } - private string defineTable(DataTable dt) { string sql = "create table " + dt.TableName + "("; @@ -1334,7 +1333,7 @@ namespace OpenSim.Framework.Data.MySQL sql += subsql; sql += ")"; - //m_log.Info(String.Format("[DATASTORE]: defineTable() sql {0}", sql)); + //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); return sql; } @@ -1477,7 +1476,7 @@ namespace OpenSim.Framework.Data.MySQL } catch (MySqlException e) { - m_log.Warn(String.Format("[MySql]: Primitives Table Already Exists: {0}", e)); + m_log.WarnFormat("[MySql]: Primitives Table Already Exists: {0}", e); } try @@ -1486,7 +1485,7 @@ namespace OpenSim.Framework.Data.MySQL } catch (MySqlException e) { - m_log.Warn(String.Format("[MySql]: Shapes Table Already Exists: {0}", e)); + m_log.WarnFormat("[MySql]: Shapes Table Already Exists: {0}", e); } try @@ -1495,7 +1494,7 @@ namespace OpenSim.Framework.Data.MySQL } catch (MySqlException e) { - m_log.Warn(String.Format("[MySql]: Items Table Already Exists: {0}", e)); + m_log.WarnFormat("[MySql]: Items Table Already Exists: {0}", e); } try @@ -1504,7 +1503,7 @@ namespace OpenSim.Framework.Data.MySQL } catch (MySqlException e) { - m_log.Warn(String.Format("[MySql]: Terrain Table Already Exists: {0}", e)); + m_log.WarnFormat("[MySql]: Terrain Table Already Exists: {0}", e); } try @@ -1513,7 +1512,7 @@ namespace OpenSim.Framework.Data.MySQL } catch (MySqlException e) { - m_log.Warn(String.Format("[MySql]: Land Table Already Exists: {0}", e)); + m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e); } try @@ -1522,7 +1521,7 @@ namespace OpenSim.Framework.Data.MySQL } catch (MySqlException e) { - m_log.Warn(String.Format("[MySql]: LandAccessList Table Already Exists: {0}", e)); + m_log.WarnFormat("[MySql]: LandAccessList Table Already Exists: {0}", e); } conn.Close(); } diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs index 69dc3f5..a724875 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs @@ -207,7 +207,7 @@ namespace OpenSim.Framework.Data.SQLite public void RemoveObject(LLUUID obj, LLUUID regionUUID) { - m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); + m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); DataTable prims = ds.Tables["prims"]; DataTable shapes = ds.Tables["primshapes"]; @@ -350,7 +350,7 @@ namespace OpenSim.Framework.Data.SQLite /// private void LoadItems(SceneObjectPart prim) { - m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID)); + m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); DataTable dbItems = ds.Tables["primitems"]; @@ -364,7 +364,7 @@ namespace OpenSim.Framework.Data.SQLite TaskInventoryItem item = buildItem(row); inventory.Add(item); - m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID)); + m_log.InfoFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); } prim.RestoreInventoryItems(inventory); @@ -1174,7 +1174,6 @@ namespace OpenSim.Framework.Data.SQLite byte[] textureEntry = (byte[]) row["Texture"]; s.TextureEntry = textureEntry; - s.ExtraParams = (byte[]) row["ExtraParams"]; // System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); // string texture = encoding.GetString((Byte[])row["Texture"]); @@ -1267,7 +1266,7 @@ namespace OpenSim.Framework.Data.SQLite if (!persistPrimInventories) return; - m_log.Info(String.Format("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID)); + m_log.InfoFormat("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID); DataTable dbItems = ds.Tables["primitems"]; @@ -1280,10 +1279,10 @@ namespace OpenSim.Framework.Data.SQLite // repalce with current inventory details foreach (TaskInventoryItem newItem in items) { -// m_log.Info(String.Format( -// "[DATASTORE]: ", -// "Adding item {0}, {1} to prim ID {2}", -// newItem.Name, newItem.ItemID, newItem.ParentPartID)); +// m_log.InfoFormat( +// "[DATASTORE]: ", +// "Adding item {0}, {1} to prim ID {2}", +// newItem.Name, newItem.ItemID, newItem.ParentPartID); DataRow newItemRow = dbItems.NewRow(); fillItemRow(newItemRow, newItem); diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index cb9e1ae..7e6e84c 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs @@ -73,8 +73,8 @@ namespace OpenSim.Grid.AssetServer if (!LLUUID.TryParse(p[0], out assetID)) { - m_log.Info(String.Format( - "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0])); + m_log.InfoFormat( + "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]); return result; } @@ -96,9 +96,9 @@ namespace OpenSim.Grid.AssetServer result = ms.GetBuffer(); - m_log.Info(String.Format( - "[REST]: GET:/asset found {0} with name {1}, size {2} bytes", - assetID, asset.Name, result.Length)); + m_log.InfoFormat( + "[REST]: GET:/asset found {0} with name {1}, size {2} bytes", + assetID, asset.Name, result.Length); Array.Resize(ref result, (int) ms.Length); } @@ -107,7 +107,7 @@ namespace OpenSim.Grid.AssetServer if (StatsManager.AssetStats != null) StatsManager.AssetStats.AddNotFoundRequest(); - m_log.Info(String.Format("[REST]: GET:/asset failed to find {0}", assetID)); + m_log.InfoFormat("[REST]: GET:/asset failed to find {0}", assetID); } } } @@ -138,7 +138,7 @@ namespace OpenSim.Grid.AssetServer XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); AssetBase asset = (AssetBase) xs.Deserialize(request); - m_log.Info(String.Format("[REST]: StoreAndCommitAsset {0}", asset.FullID)); + m_log.InfoFormat("[REST]: StoreAndCommitAsset {0}", asset.FullID); m_assetProvider.CreateAsset(asset); m_assetProvider.CommitAssets(); diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index 35b66b2..a3d8483 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs @@ -168,14 +168,14 @@ namespace OpenSim.Grid.InventoryServer private byte[] GetUserInventory(LLUUID userID) { - m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Getting Inventory for user {0}", userID.ToString())); + m_log.InfoFormat("[" + OpenInventory_Main.LogName + "]: Getting Inventory for user {0}", userID.ToString()); byte[] result = new byte[] {}; InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); if (fb == null) { - m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Inventory not found for user {0}, creating new", - userID.ToString())); + m_log.InfoFormat("[" + OpenInventory_Main.LogName + "]: Inventory not found for user {0}, creating new", + userID.ToString()); CreateDefaultInventory(userID); } diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index c69416a..b093d02 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -156,7 +156,7 @@ namespace OpenSim.Grid.UserServer m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); } catch (Exception ex) { - m_log.Error(String.Format("[SERVER]: Error creating user: {0}", ex.ToString())); + m_log.ErrorFormat("[SERVER]: Error creating user: {0}", ex.ToString()); } try @@ -166,7 +166,7 @@ namespace OpenSim.Grid.UserServer } catch (Exception ex) { - m_log.Error(String.Format("[SERVER]: Error creating inventory for user: {0}", ex.ToString())); + m_log.ErrorFormat("[SERVER]: Error creating inventory for user: {0}", ex.ToString()); } m_lastCreatedUser = userID; break; diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 73cfb9a..2328c49 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -351,7 +351,7 @@ namespace OpenSim m_moduleLoader = new ModuleLoader(m_config); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); - m_log.Info(String.Format("[PLUGINS]: Loading {0} OpenSim application plugins", nodes.Count)); + m_log.InfoFormat("[PLUGINS]: Loading {0} OpenSim application plugins", nodes.Count); foreach (TypeExtensionNode node in nodes) { @@ -704,7 +704,7 @@ namespace OpenSim m_console.Notice("set-time [x] - set the current scene time phase"); m_console.Notice("show assets - show state of asset cache."); m_console.Notice("show users - show info about connected users."); - m_console.Notice("show modules - shows info aboutloaded modules."); + m_console.Notice("show modules - shows info about loaded modules."); m_console.Notice("show stats - statistical information for this server not displayed in the client"); m_console.Notice("shutdown - disconnect all clients and shutdown."); m_console.Notice("config set section field value - set a config value"); diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index d7f4c3d..d4af98c 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -240,8 +240,8 @@ namespace OpenSim.Region.ClientStack { m_scene.RemoveClient(AgentId); - //m_log.Info(String.Format("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false))); - //m_log.Info(String.Format("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true))); + //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); + //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); // Send the STOP packet DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 656dd70..81689ed 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -73,9 +73,9 @@ namespace OpenSim.Region.Communications.OGS1 { try { - m_log.Info( - String.Format("[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}", - _inventoryServerUrl, userID)); + m_log.InfoFormat( + "[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}", + _inventoryServerUrl, userID); RestObjectPosterResponse requester = new RestObjectPosterResponse(); @@ -98,9 +98,9 @@ namespace OpenSim.Region.Communications.OGS1 LLUUID userID = response.UserID; if (m_RequestingInventory.ContainsKey(userID)) { - m_log.Info(String.Format("[INVENTORY]: " + - "Received inventory response for user {0} containing {1} folders and {2} items", - userID, response.Folders.Count, response.AllItems.Count)); + m_log.InfoFormat("[INVENTORY]: " + + "Received inventory response for user {0} containing {1} folders and {2} items", + userID, response.Folders.Count, response.AllItems.Count); InventoryFolderImpl rootFolder = null; InventoryRequest request = m_RequestingInventory[userID]; @@ -134,10 +134,10 @@ namespace OpenSim.Region.Communications.OGS1 } else { - m_log.Warn( - String.Format("[INVENTORY]: " + - "Received inventory response for {0} for which we do not have a record of requesting!", - userID)); + m_log.WarnFormat( + "[INVENTORY]: " + + "Received inventory response for {0} for which we do not have a record of requesting!", + userID); } } diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index d4031d9..bc0bbaf 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs @@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment DynamicTextureModule dynamicModule = new DynamicTextureModule(); if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) { - m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule")); + m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); } else { @@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment ChatModule chat = new ChatModule(); if (m_loadedSharedModules.ContainsKey(chat.Name)) { - m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule")); + m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); } else { @@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment InstantMessageModule imMod = new InstantMessageModule(); if (m_loadedSharedModules.ContainsKey(imMod.Name)) { - m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule")); + m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); } else { @@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment LoadImageURLModule loadMod = new LoadImageURLModule(); if (m_loadedSharedModules.ContainsKey(loadMod.Name)) { - m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule")); + m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); } else { @@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) { - m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule")); + m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); } else { @@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment XMLRPCModule xmlRpcMod = new XMLRPCModule(); if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) { - m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule")); + m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); } else { @@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment if (modules.Length > 0) { - m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName)); + m_log.InfoFormat("[MODULES]: Found Module Library [{0}]", dllName); foreach (IRegionModule module in modules) { if (!module.IsSharedModule) { - m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name)); + m_log.InfoFormat("[MODULES]: [{0}]: Initializing.", module.Name); InitializeModule(module, scene); } else { - m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name)); + m_log.InfoFormat("[MODULES]: [{0}]: Loading Shared Module.", module.Name); LoadSharedModule(module); } } @@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment } catch (BadImageFormatException) { - //m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName)); + //m_log.InfoFormat("[MODULES]: The file [{0}] is not a module assembly.", e.FileName); } } @@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment } catch (ReflectionTypeLoadException) { - m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName)); + m_log.InfoFormat("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName); } } diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index 4f877be..cf558e0 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules // Make sure that any sender we currently have can get garbage collected sender = null; - //m_log.Info(String.Format("[TEXTURE DOWNLOAD] Texture sender queue size: {0}", m_queueSenders.Count())); + //m_log.InfoFormat("[TEXTURE DOWNLOAD] Texture sender queue size: {0}", m_queueSenders.Count()); } } diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs index 999f4a2..32bc7c3 100644 --- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs @@ -104,9 +104,9 @@ namespace OpenSim.Region.Environment.Modules EnqueueTextureSender(textureSender); } - //m_log.Info(String.Format("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID)); + //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); m_textureSenders.Remove(textureID); - //m_log.Info(String.Format("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count)); + //m_log.InfoFormat("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count); } else { diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 3a38bd2..19213fd 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -925,9 +925,9 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Info(String.Format("[SCENE]: " + - "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", - primIds)); + m_log.InfoFormat("[SCENE]: " + + "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", + primIds); } } @@ -975,7 +975,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Warn(String.Format("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID)); + m_log.WarnFormat("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID); } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 28760fd..cc9d294 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -83,8 +83,8 @@ namespace OpenSim.Region.Environment.Scenes if (!TryGetAvatar(avatarId, out avatar)) { - m_log.Error(String.Format( - "[AGENTINVENTORY]: Could not find avatar {0} to add inventory item", avatarId)); + m_log.ErrorFormat( + "[AGENTINVENTORY]: Could not find avatar {0} to add inventory item", avatarId); return; } @@ -146,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[AGENTINVENTORY]: " + - "Avatar {0} cannot be found to update its inventory item asset", - avatarId)); + m_log.ErrorFormat( + "[AGENTINVENTORY]: " + + "Avatar {0} cannot be found to update its inventory item asset", + avatarId); } return LLUUID.Zero; @@ -171,10 +171,10 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectGroup group = part.ParentGroup; if (null == group) { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", - itemId, primId)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", + itemId, primId); return; } @@ -220,10 +220,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Avatar {0} cannot be found to update its prim item asset", - avatarId)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Avatar {0} cannot be found to update its prim item asset", + avatarId); } } @@ -498,8 +498,8 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID); } } @@ -524,11 +524,11 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Removal of item {0} requested of prim {1} but this prim does not exist", - itemID, - localID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Removal of item {0} requested of prim {1} but this prim does not exist", + itemID, + localID); } } @@ -548,18 +548,18 @@ namespace OpenSim.Region.Environment.Scenes { // TODO Retrieve itemID from client's inventory to pass on //group.AddInventoryItem(remoteClient, primLocalID, null); - m_log.Info(String.Format( - "[PRIMINVENTORY]: " + - "Non script prim inventory not yet implemented!" - + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", - itemID, folderID, primLocalID, remoteClient.Name)); + m_log.InfoFormat( + "[PRIMINVENTORY]: " + + "Non script prim inventory not yet implemented!" + + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", + itemID, folderID, primLocalID, remoteClient.Name); } else { - m_log.Warn(String.Format( - "[PRIMINVENTORY]: " + - "Update with item {0} requested of prim {1} for {2} but this prim does not exist", - itemID, primLocalID, remoteClient.Name)); + m_log.WarnFormat( + "[PRIMINVENTORY]: " + + "Update with item {0} requested of prim {1} for {2} but this prim does not exist", + itemID, primLocalID, remoteClient.Name); } } @@ -604,18 +604,18 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Could not rez script {0} into prim local ID {1} for user {2}" - + " because the prim could not be found in the region!", - item.inventoryName, localID, remoteClient.Name)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Could not rez script {0} into prim local ID {1} for user {2}" + + " because the prim could not be found in the region!", + item.inventoryName, localID, remoteClient.Name); } } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: Could not find script inventory item {0} to rez for {1}!", - itemID, remoteClient.Name)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: Could not find script inventory item {0} to rez for {1}!", + itemID, remoteClient.Name); } } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a4f5028..5026688 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1432,7 +1432,7 @@ namespace OpenSim.Region.Environment.Scenes { if (m_scenePresences.Remove(agentID)) { - //m_log.Info(String.Format("[SCENE] Removed scene presence {0}", agentID)); + //m_log.InfoFormat("[SCENE] Removed scene presence {0}", agentID); } else { @@ -1445,7 +1445,7 @@ namespace OpenSim.Region.Environment.Scenes { if (Entities.Remove(agentID)) { - //m_log.Info(String.Format("[SCENE] Removed scene presence {0} from entities list", agentID)); + //m_log.InfoFormat("[SCENE] Removed scene presence {0} from entities list", agentID); } else { @@ -1470,8 +1470,8 @@ namespace OpenSim.Region.Environment.Scenes // Remove client agent from profile, so new logins will work CommsManager.UserService.clearUserAgent(agentID); - //m_log.Info(String.Format("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false))); - //m_log.Info(String.Format("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true))); + //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); + //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); } public override void CloseAllAgents(uint circuitcode) diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 17d2959..0b88050 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -296,10 +296,10 @@ namespace OpenSim.Region.Environment.Scenes { if (!scenePresence.IsChildAgent) { - m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", - scenePresence.Firstname, - scenePresence.Lastname, - newDebug)); + m_log.ErrorFormat("Packet debug for {0} {1} set to {2}", + scenePresence.Firstname, + scenePresence.Lastname, + newDebug); scenePresence.ControllingClient.SetDebug(newDebug); } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 6bd0575..e26ed5c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs @@ -55,10 +55,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", - localID, Name, UUID, itemID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", + localID, Name, UUID, itemID); } } @@ -76,10 +76,10 @@ namespace OpenSim.Region.Environment.Scenes // } // else // { -// m_log.Error(String.Format( -// "[PRIMINVENTORY]: " + -// "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", -// localID, Name, UUID, itemID)); +// m_log.ErrorFormat( +// "[PRIMINVENTORY]: " + +// "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", +// localID, Name, UUID, itemID); // } // } @@ -123,10 +123,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", - partID, Name, UUID, itemID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", + partID, Name, UUID, itemID); } } @@ -144,10 +144,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", - localID, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", + localID, Name, UUID); } return false; } @@ -161,10 +161,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find part {0} in object group {1}, {2} to request inventory data", - localID, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find part {0} in object group {1}, {2} to request inventory data", + localID, Name, UUID); } } @@ -200,10 +200,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", - localID, Name, UUID, newItemId)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", + localID, Name, UUID, newItemId); } return false; @@ -224,10 +224,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", - primID, part.Name, part.UUID, itemID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", + primID, part.Name, part.UUID, itemID); } return null; @@ -250,10 +250,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't find prim ID {0} to update item {1}, {2}", - item.ParentPartID, item.Name, item.ItemID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't find prim ID {0} to update item {1}, {2}", + item.ParentPartID, item.Name, item.ItemID); } return false; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 5ae657e..c204389 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1003,9 +1003,9 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Info(String.Format("[SCENE]: " + - "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", - partID, LocalId)); + m_log.InfoFormat("[SCENE]: " + + "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", + partID, LocalId); } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 62c3436..a27432d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -147,10 +147,10 @@ namespace OpenSim.Region.Environment.Scenes /// public void StartScript(TaskInventoryItem item) { -// m_log.Info(String.Format( -// "[PRIMINVENTORY]: " + -// "Starting script {0}, {1} in prim {2}, {3}", -// item.Name, item.ItemID, Name, UUID)); +// m_log.InfoFormat( +// "[PRIMINVENTORY]: " + +// "Starting script {0}, {1} in prim {2}, {3}", +// item.Name, item.ItemID, Name, UUID); AddFlag(LLObject.ObjectFlags.Scripted); if (!((m_parentGroup.Scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)) @@ -166,10 +166,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't start script {0}, {1} since asset ID {2} could not be found", - item.Name, item.ItemID, item.AssetID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't start script {0}, {1} since asset ID {2} could not be found", + item.Name, item.ItemID, item.AssetID); } } ScheduleFullUpdate(); @@ -192,10 +192,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", - itemId, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", + itemId, Name, UUID); } } } @@ -206,27 +206,18 @@ namespace OpenSim.Region.Environment.Scenes /// public void StopScript(LLUUID itemId) { - - if (m_taskInventory.ContainsKey(itemId)) { - m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); m_parentGroup.AddActiveScriptCount(-1); - - - - - } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", - itemId, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", + itemId, Name, UUID); } - } /// @@ -285,10 +276,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", - itemID, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", + itemID, Name, UUID); } } @@ -317,10 +308,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", - item.ItemID, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", + item.ItemID, Name, UUID); } } @@ -374,10 +365,10 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.Error(String.Format( - "[PRIMINVENTORY]: " + - "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", - itemID, Name, UUID)); + m_log.ErrorFormat( + "[PRIMINVENTORY]: " + + "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", + itemID, Name, UUID); } } @@ -442,8 +433,8 @@ namespace OpenSim.Region.Environment.Scenes fileData = Helpers.StringToField(invString.BuildString); -// m_log.Info(String.Format( -// "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData))); +// m_log.InfoFormat( +// "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData)); if (fileData.Length > 2) { diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index acaa389b..82eef35 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.Physics.Manager } else { - m_log.Warn(String.Format("[PHYSICS]: couldn't find meshingEngine: {0}", meshEngineName)); + m_log.WarnFormat("[PHYSICS]: couldn't find meshingEngine: {0}", meshEngineName); throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); } diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index bd2ad99..00c0ff1 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -95,7 +95,7 @@ namespace OpenSim.Region.Physics.Manager public override PhysicsActor AddAvatar(string avName, PhysicsVector position) { - m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position)); + m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position); return PhysicsActor.Null; } @@ -110,7 +110,7 @@ namespace OpenSim.Region.Physics.Manager /* public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) { - m_log.Info(String.Format("NullPhysicsScene : AddPrim({0},{1})", position, size)); + m_log.InfoFormat("NullPhysicsScene : AddPrim({0},{1})", position, size); return PhysicsActor.Null; } */ @@ -124,7 +124,7 @@ namespace OpenSim.Region.Physics.Manager public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, PhysicsVector size, Quaternion rotation, bool isPhysical) { - m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size)); + m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size); return PhysicsActor.Null; } @@ -146,7 +146,7 @@ namespace OpenSim.Region.Physics.Manager public override void SetTerrain(float[] heightMap) { - m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : SetTerrain({0} items)", heightMap.Length)); + m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); } public override void DeleteTerrain() diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 641e25d..a394ffb 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -245,7 +245,7 @@ namespace OpenSim.Region.Physics.Meshing // Calculated separately to avoid errors cutHull.AddVertex(legEnd); - //m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName)); + //m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName); SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); outerHull = cuttedHull; @@ -520,7 +520,7 @@ namespace OpenSim.Region.Physics.Meshing // Calculated separately to avoid errors cutHull.AddVertex(legEnd); - m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName)); + m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName); SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); outerHull = cuttedHull; diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index e9cce3b..91df98f 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs @@ -246,8 +246,8 @@ namespace OpenSim.Region.Physics.Meshing bool intersects = false; //m_log.Debug("State before intersection detection"); - //m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString())); - //m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString())); + //m_log.DebugFormat("The baseHull is:\n{1}", 0, baseHullClone.ToString()); + //m_log.DebugFormat("The otherHull is:\n{1}", 0, otherHullClone.ToString()); { int iBase, iOther; @@ -277,7 +277,7 @@ namespace OpenSim.Region.Physics.Meshing } //m_log.Debug("State after intersection detection for the base hull"); - //m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString())); + //m_log.DebugFormat("The baseHull is:\n{1}", 0, baseHullClone.ToString()); { int iOther, iBase; @@ -306,7 +306,7 @@ namespace OpenSim.Region.Physics.Meshing } //m_log.Debug("State after intersection detection for the base hull"); - //m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString())); + //m_log.DebugFormat("The otherHull is:\n{1}", 0, otherHullClone.ToString()); bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); @@ -389,7 +389,7 @@ namespace OpenSim.Region.Physics.Meshing done = true; } - //m_log.Debug(String.Format("The resulting Hull is:\n{1}", 0, result.ToString())); + //m_log.DebugFormat("The resulting Hull is:\n{1}", 0, result.ToString()); return result; } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index b407f8d..68ac99c 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -86,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); #if DEBUG - m_scriptEngine.Log.Debug(String.Format("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before)); + m_scriptEngine.Log.DebugFormat("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before); #endif CompiledScript.Source = Script; diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index 6a79c8a..0343b79 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs @@ -142,7 +142,7 @@ namespace OpenSim.DataStore.MSSQL public void RemoveObject(LLUUID obj, LLUUID regionUUID) { - m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); + m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); DataTable prims = ds.Tables["prims"]; DataTable shapes = ds.Tables["primshapes"]; -- cgit v1.1