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/Grid/AssetServer/RestService.cs | 14 +++++++------- OpenSim/Grid/InventoryServer/InventoryManager.cs | 6 +++--- OpenSim/Grid/UserServer/Main.cs | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Grid') 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; -- cgit v1.1