Clean up logging calls using String.Format explicitly

This commit is contained in:
Jeff Ames
2008-02-10 01:57:59 +00:00
parent 523284c32a
commit e207284fef
35 changed files with 222 additions and 233 deletions

View File

@@ -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<byte>(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();

View File

@@ -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);
}

View File

@@ -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;