From bf5e51ec2c051f39fb9ca5b261bbc0d2bc0ac07d Mon Sep 17 00:00:00 2001
From: "Justin Clark-Casey (justincc)" <jjustincc@googlemail.com>
Date: Wed, 2 Dec 2009 17:55:56 +0000
Subject: [PATCH] Add position and region of prim items with missing assets in
 log reports

---
 .../Scenes/SceneObjectPartInventory.cs        | 25 +++++++++++--------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index f4ca877941..589e43b8dc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -259,8 +259,9 @@ namespace OpenSim.Region.Framework.Scenes
                                    {
                                        m_log.ErrorFormat(
                                            "[PRIM INVENTORY]: " +
-                                           "Couldn't start script {0}, {1} since asset ID {2} could not be found",
-                                           item.Name, item.ItemID, item.AssetID);
+                                           "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
+                                           item.Name, item.ItemID, m_part.AbsolutePosition, 
+                                           m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
                                    }
                                    else
                                    {
@@ -312,8 +313,9 @@ namespace OpenSim.Region.Framework.Scenes
                 {
                     m_log.ErrorFormat(
                         "[PRIM INVENTORY]: " +
-                        "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}",
-                        itemId, m_part.Name, m_part.UUID);
+                        "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
+                        itemId, m_part.Name, m_part.UUID, 
+                        m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
                 }
             }
         }
@@ -333,8 +335,9 @@ namespace OpenSim.Region.Framework.Scenes
             {
                 m_log.ErrorFormat(
                     "[PRIM INVENTORY]: " +
-                    "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}",
-                    itemId, m_part.Name, m_part.UUID);
+                    "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
+                    itemId, m_part.Name, m_part.UUID, 
+                    m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
             }
         }
 
@@ -522,8 +525,9 @@ namespace OpenSim.Region.Framework.Scenes
                 {
                     m_log.ErrorFormat(
                         "[PRIM INVENTORY]: " +
-                        "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
-                        item.ItemID, m_part.Name, m_part.UUID);
+                        "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
+                        item.ItemID, m_part.Name, m_part.UUID, 
+                        m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
                 }
             }
 
@@ -579,8 +583,9 @@ namespace OpenSim.Region.Framework.Scenes
                 {
                     m_log.ErrorFormat(
                         "[PRIM INVENTORY]: " +
-                        "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
-                        itemID, m_part.Name, m_part.UUID);
+                        "Tried to remove item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
+                        itemID, m_part.Name, m_part.UUID, 
+                        m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
                 }
             }