mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Clean up logging calls using String.Format explicitly
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,10 +147,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <returns></returns>
|
||||
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
|
||||
/// <param name="itemId"></param>
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user