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] // [or maybe we can if we do more checking like data lenght checks]
if (uploaderFound != null) if (uploaderFound != null)
{ {
// m_log.Info( // m_log.InfoFormat(
// String.Format( // "[ASSET TRANSACTIONS] Removing asset xfer uploader with transfer id {0}, transaction {1}",
// "[ASSET TRANSACTIONS] Removing asset xfer uploader with transfer id {0}, transaction {1}", // xferID, uploaderFound.TransactionID);
// xferID, uploaderFound.TransactionID));
// XferUploaders.Remove(uploaderFound.TransactionID); // XferUploaders.Remove(uploaderFound.TransactionID);

View File

@ -266,9 +266,7 @@ namespace OpenSim.Framework.Communications.Cache
} }
} while (--maxPolls > 0); } while (--maxPolls > 0);
m_log.Warn( m_log.WarnFormat("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached", assetID.ToString());
String.Format("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached", assetID.ToString())
);
return null; return null;
} }

View File

@ -70,15 +70,13 @@ namespace OpenSim.Framework.Communications.Cache
if (asset != null) if (asset != null)
{ {
//m_log.Info( //m_log.InfoFormat("[ASSET]: Asset {0} received from asset server", req.AssetID);
// String.Format("[ASSET]: Asset {0} received from asset server", req.AssetID));
m_receiver.AssetReceived(asset, req.IsTexture); m_receiver.AssetReceived(asset, req.IsTexture);
} }
else else
{ {
m_log.Error( m_log.ErrorFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID);
String.Format("[ASSET]: Asset {0} not found by asset server", req.AssetID));
m_receiver.AssetNotFound(req.AssetID); m_receiver.AssetNotFound(req.AssetID);
} }
@ -93,7 +91,6 @@ namespace OpenSim.Framework.Communications.Cache
CommitAssets(); CommitAssets();
} }
public AssetServerBase() public AssetServerBase()
{ {
m_log.Info("[ASSETSERVER]: Starting asset storage system"); m_log.Info("[ASSETSERVER]: Starting asset storage system");
@ -163,4 +160,4 @@ namespace OpenSim.Framework.Communications.Cache
{ {
} }
} }
} }

View File

@ -140,9 +140,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="assets"></param> /// <param name="assets"></param>
protected void LoadLibraries(string librariesControlPath) protected void LoadLibraries(string librariesControlPath)
{ {
m_log.Info( m_log.InfoFormat(
String.Format( "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath);
"[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath));
LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
} }
@ -188,9 +187,8 @@ namespace OpenSim.Framework.Communications.Cache
libraryFolders.Add(folderInfo.folderID, folderInfo); libraryFolders.Add(folderInfo.folderID, folderInfo);
parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
// m_log.Info( // m_log.InfoFormat("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID);
// String.Format("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID));
} }
else else
{ {
@ -258,14 +256,12 @@ namespace OpenSim.Framework.Communications.Cache
} }
catch (XmlException e) catch (XmlException e)
{ {
m_log.Error( m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e);
String.Format("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e));
} }
} }
else else
{ {
m_log.Error( m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path);
String.Format("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path));
} }
} }

View File

@ -233,28 +233,25 @@ namespace OpenSim.Framework.Communications.Cache
} }
else else
{ {
m_log.Error( m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name);
String.Format("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name));
return; return;
} }
} }
else else
{ {
m_log.Error( m_log.ErrorFormat("[INVENTORYCACHE]: " +
String.Format("[INVENTORYCACHE]: " +
"Could not find user profile for {0} for folder {1}", "Could not find user profile for {0} for folder {1}",
remoteClient.Name, folderID)); remoteClient.Name, folderID);
return; return;
} }
// If we've reached this point then we couldn't find the folder, even though the client thinks // If we've reached this point then we couldn't find the folder, even though the client thinks
// it exists // it exists
m_log.Error( m_log.ErrorFormat("[INVENTORYCACHE]: " +
String.Format("[INVENTORYCACHE]: " +
"Could not find folder {0} for user {1}", "Could not find folder {0} for user {1}",
folderID, remoteClient.Name)); folderID, remoteClient.Name);
} }
public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)

View File

@ -305,10 +305,9 @@ namespace OpenSim.Region.Capabilities
uploadResponse.uploader = uploaderURL; uploadResponse.uploader = uploaderURL;
uploadResponse.state = "upload"; uploadResponse.state = "upload";
// m_log.Info( // m_log.InfoFormat("[CAPS]: " +
// String.Format("[CAPS]: " + // "ScriptTaskInventory response: {0}",
// "ScriptTaskInventory response: {0}", // LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
return LLSDHelpers.SerialiseLLSDReply(uploadResponse); return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
} }
@ -351,10 +350,9 @@ namespace OpenSim.Region.Capabilities
uploadResponse.uploader = uploaderURL; uploadResponse.uploader = uploaderURL;
uploadResponse.state = "upload"; uploadResponse.state = "upload";
// m_log.Info( // m_log.InfoFormat("[CAPS]: " +
// String.Format("[CAPS]: " + // "NoteCardAgentInventory response: {0}",
// "NoteCardAgentInventory response: {0}", // LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
return LLSDHelpers.SerialiseLLSDReply(uploadResponse); return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
} }
@ -683,10 +681,9 @@ namespace OpenSim.Region.Capabilities
{ {
try try
{ {
// m_log.Info( // m_log.InfoFormat("[CAPS]: " +
// String.Format("[CAPS]: " + // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", // data, path, param));
// data, path, param));
string res = String.Empty; string res = String.Empty;
LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete();

View File

@ -147,10 +147,9 @@ namespace OpenSim.Framework.Communications
if (null != existingRootFolder) if (null != existingRootFolder)
{ {
m_log.Error( m_log.ErrorFormat("[AGENTINVENTORY]: " +
String.Format("[AGENTINVENTORY]: " +
"Did not create a new inventory for user {0} since they already have " "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 else
{ {

View File

@ -601,8 +601,7 @@ namespace OpenSim.Framework.UserManagement
public virtual bool AuthenticateUser(UserProfileData profile, string password) public virtual bool AuthenticateUser(UserProfileData profile, string password)
{ {
bool passwordSuccess = false; bool passwordSuccess = false;
m_log.Info( m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID);
String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID));
// Web Login method seems to also occasionally send the hashed password itself // 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) public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey)
{ {
bool passwordSuccess = false; bool passwordSuccess = false;
m_log.Info( m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID);
String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID));
// Match web login key unless it's the default weblogin key LLUUID.Zero // Match web login key unless it's the default weblogin key LLUUID.Zero
passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero); passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero);

View File

@ -1,42 +1,42 @@
-- --
-- Create schema avatar_appearance -- Create schema avatar_appearance
-- --
CREATE DATABASE IF NOT EXISTS avatar_appearance; CREATE DATABASE IF NOT EXISTS avatar_appearance;
USE avatar_appearance; USE avatar_appearance;
DROP TABLE IF EXISTS `avatarappearance`; DROP TABLE IF EXISTS `avatarappearance`;
CREATE TABLE `avatarappearance` ( CREATE TABLE `avatarappearance` (
`UUID` char(36) NOT NULL, `UUID` char(36) NOT NULL,
`Serial` int(10) unsigned NOT NULL, `Serial` int(10) unsigned NOT NULL,
`WearableItem0` char(36) NOT NULL, `WearableItem0` char(36) NOT NULL,
`WearableAsset0` char(36) NOT NULL, `WearableAsset0` char(36) NOT NULL,
`WearableItem1` char(36) NOT NULL, `WearableItem1` char(36) NOT NULL,
`WearableAsset1` char(36) NOT NULL, `WearableAsset1` char(36) NOT NULL,
`WearableItem2` char(36) NOT NULL, `WearableItem2` char(36) NOT NULL,
`WearableAsset2` char(36) NOT NULL, `WearableAsset2` char(36) NOT NULL,
`WearableItem3` char(36) NOT NULL, `WearableItem3` char(36) NOT NULL,
`WearableAsset3` char(36) NOT NULL, `WearableAsset3` char(36) NOT NULL,
`WearableItem4` char(36) NOT NULL, `WearableItem4` char(36) NOT NULL,
`WearableAsset4` char(36) NOT NULL, `WearableAsset4` char(36) NOT NULL,
`WearableItem5` char(36) NOT NULL, `WearableItem5` char(36) NOT NULL,
`WearableAsset5` char(36) NOT NULL, `WearableAsset5` char(36) NOT NULL,
`WearableItem6` char(36) NOT NULL, `WearableItem6` char(36) NOT NULL,
`WearableAsset6` char(36) NOT NULL, `WearableAsset6` char(36) NOT NULL,
`WearableItem7` char(36) NOT NULL, `WearableItem7` char(36) NOT NULL,
`WearableAsset7` char(36) NOT NULL, `WearableAsset7` char(36) NOT NULL,
`WearableItem8` char(36) NOT NULL, `WearableItem8` char(36) NOT NULL,
`WearableAsset8` char(36) NOT NULL, `WearableAsset8` char(36) NOT NULL,
`WearableItem9` char(36) NOT NULL, `WearableItem9` char(36) NOT NULL,
`WearableAsset9` char(36) NOT NULL, `WearableAsset9` char(36) NOT NULL,
`WearableItem10` char(36) NOT NULL, `WearableItem10` char(36) NOT NULL,
`WearableAsset10` char(36) NOT NULL, `WearableAsset10` char(36) NOT NULL,
`WearableItem11` char(36) NOT NULL, `WearableItem11` char(36) NOT NULL,
`WearableAsset11` char(36) NOT NULL, `WearableAsset11` char(36) NOT NULL,
`WearableItem12` char(36) NOT NULL, `WearableItem12` char(36) NOT NULL,
`WearableAsset12` char(36) NOT NULL, `WearableAsset12` char(36) NOT NULL,
PRIMARY KEY (`UUID`) PRIMARY KEY (`UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

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

View File

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

View File

@ -80,7 +80,7 @@ namespace OpenSim.Region.Physics.Manager
} }
else 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)); throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName));
} }
} }