Clean up more unnecessary String.Format calls

ThreadPoolClientBranch
Jeff Ames 2008-02-13 03:38:18 +00:00
parent a1a206cb05
commit 001ce95e4c
12 changed files with 83 additions and 107 deletions

View File

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

View File

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

View File

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

View File

@ -140,9 +140,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="assets"></param>
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);
}
@ -189,8 +188,7 @@ 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);
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -600,10 +600,9 @@ namespace OpenSim.Region.Environment.Scenes
group.StartScript(localID, copyID);
group.GetProperties(remoteClient);
// m_log.Info(
// String.Format("[PRIMINVENTORY]: " +
// "Rezzed script {0} into prim local ID {1} for user {2}",
// item.inventoryName, localID, remoteClient.Name));
// m_log.InfoFormat("[PRIMINVENTORY]: " +
// "Rezzed script {0} into prim local ID {1} for user {2}",
// item.inventoryName, localID, remoteClient.Name);
}
else
{

View File

@ -1477,8 +1477,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else
{
m_log.Warn(
String.Format("[SCENE] Tried to remove non-existent scene prescence with agent ID {0} from scene ScenePresences list", agentID));
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene prescence with agent ID {0} from scene ScenePresences list", agentID);
}
}
@ -1490,8 +1489,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else
{
m_log.Warn(
String.Format("[SCENE] Tried to remove non-existent scene prescence with agent ID {0} from scene Entities list", agentID));
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene prescence with agent ID {0} from scene Entities list", agentID);
}
}
@ -2302,21 +2300,19 @@ namespace OpenSim.Region.Environment.Scenes
{
case "users":
m_log.Error("Current Region: " + RegionInfo.RegionName);
m_log.Error(
String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname",
"Agent ID", "Session ID", "Circuit", "IP", "World"));
m_log.ErrorFormat("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname",
"Agent ID", "Session ID", "Circuit", "IP", "World");
foreach (ScenePresence scenePrescence in GetAvatars())
{
m_log.Error(
String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
m_log.ErrorFormat("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
scenePrescence.Firstname,
scenePrescence.Lastname,
scenePrescence.UUID,
scenePrescence.ControllingClient.AgentId,
"Unknown",
"Unknown",
RegionInfo.RegionName));
RegionInfo.RegionName);
}
break;
case "modules":

View File

@ -80,7 +80,7 @@ namespace OpenSim.Region.Physics.Manager
}
else
{
m_log.Warn(String.Format("[PHYSICS]: couldn't find physicsEngine: {0}", physEngineName));
m_log.WarnFormat("[PHYSICS]: couldn't find physicsEngine: {0}", physEngineName);
throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName));
}
}