From fb8a91bc8d3ec69cb1f3ebb54e70bff561336a94 Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Mon, 21 Mar 2011 14:51:03 -0700 Subject: [PATCH] Removed some debug logs, and changed some from Debug to DebugFormat. --- .../SymmetricSync/RegionSyncModule.cs | 95 +++---------------- .../Framework/Scenes/Scene.Inventory.cs | 7 -- OpenSim/Region/Framework/Scenes/Scene.cs | 8 -- .../Framework/Scenes/SceneObjectPart.cs | 5 - 4 files changed, 12 insertions(+), 103 deletions(-) diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index d016e9390c..9999a05ff2 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -505,12 +505,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule data[partTempID] = OSD.FromUUID(part.UUID); partNum++; - m_log.Debug("SendLinkObject to link " + part.ParentGroup.Name + "," + part.UUID + " with " + root.Name+","+root.UUID); + m_log.DebugFormat("{0}: SendLinkObject to link {1},{2} with {3}, {4}", part.Name, part.UUID, root.Name, root.UUID); } - m_log.Debug(LogHeader + " to SendLinkObject to link " + children.Count + " parts to " + root.Name + "," + root.UUID); - //m_log.Debug("LinkedObject: "+sogxml); - SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.LinkObject, OSDParser.SerializeJsonString(data)); //SendObjectUpdateToRelevantSyncConnectors(linkedGroup, rsm); SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, linkedGroup); @@ -864,15 +861,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule //string sogGeneralBucketEncoding = GeneralBucketPropertiesEncoder(bucketName, sog, null); SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedObject, sogGeneralBucketEncoding); - //TEMP DEBUG - foreach (SceneObjectPart part in sog.Parts) - { - if (part.IsAttachment) - { - m_log.Debug(LogHeader + "PrimUpdatesGeneralBucketSender: part " + part.Name + "," + part.UUID + ", IsAttachment = true"); - } - } - lock (m_stats) m_statSOGBucketOut++; //m_log.DebugFormat(LogHeader + " calling SendObjectUpdateToRelevantSyncConnectors for general bucket for sog {0},{1}", sog.Name, sog.UUID); @@ -921,13 +909,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(partData)); //m_log.DebugFormat("{0}: PhysBucketSender for {1}, pos={2}", LogHeader, updatedPart.UUID.ToString(), pa.Position.ToString()); - //TEMP DEBUG - if (updatedPart.IsAttachment) - { - m_log.Debug(LogHeader + "PrimUpdatesPhysicsBucketSender: part " + updatedPart.Name + "," + updatedPart.UUID + ", IsAttachment = true"); - } - - lock (m_stats) m_statPhysBucketOut++; SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg); @@ -1131,7 +1112,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule { if (!syncConnectorsSent.Contains(connector.ConnectorNum)) { - m_log.Debug(LogHeader + " send DeLinkObject to " + connector.Description); + m_log.DebugFormat("{0}: send DeLinkObject to {1}", LogHeader, connector.Description); connector.EnqueueOutgoingUpdate(sog.UUID, syncMsg.ToBytes()); syncConnectorsSent.Add(connector.ConnectorNum); } @@ -1293,8 +1274,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule //For now, we use configuration to access the information. Might be replaced by some Grid Service later on. private RegionSyncListenerInfo GetLocalSyncListenerInfo() { - m_log.Debug(LogHeader + ": Reading in " + m_scene.RegionInfo.RegionName + "_SyncListenerIPAddress" + " and " + m_scene.RegionInfo.RegionName + "_SyncListenerPort"); - //string addr = m_sysConfig.GetString(m_scene.RegionInfo.RegionName+"_SyncListenerIPAddress", IPAddrUnknown); //int port = m_sysConfig.GetInt(m_scene.RegionInfo.RegionName+"_SyncListenerPort", PortUnknown); @@ -1507,7 +1486,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule SceneObjectSerializer.WriteBucketSyncInfo(writer, bucketSyncInfoList); string xmlString = sw.ToString(); - m_log.Debug("Serialized xml string: " + xmlString); + m_log.DebugFormat("Serialized xml string: {0}", xmlString); //second, test de-serialization XmlTextReader reader = new XmlTextReader(new StringReader(xmlString)); @@ -1573,7 +1552,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule m_syncConnectors = newlist; } - m_log.Debug("[REGION SYNC MODULE]: new connector " + syncConnector.ConnectorNum); + m_log.DebugFormat("{0}: new connector {1}", LogHeader, syncConnector.ConnectorNum); } public void RemoveSyncConnector(SyncConnector syncConnector) @@ -1805,7 +1784,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule //set new terrain m_scene.Heightmap.LoadFromXmlString(msgData); m_scene.RequestModuleInterface().TaintTerrianBySynchronization(lastUpdateTimeStamp, lastUpdateActorID); ; - m_log.Debug(LogHeader + ": Synchronized terrain"); + m_log.DebugFormat("{0} : Synchronized terrain", LogHeader); } private void HandleAddNewObject(SymmetricSyncMessage msg, string senderActorID) @@ -1864,13 +1843,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule } else { - foreach (SceneObjectPart part in sog.Parts) - { - if (part.IsAttachment) - { - m_log.Debug(LogHeader + "HandleUpdateObjectBySynchronization: part " + part.Name + "," + part.UUID + ", IsAttachment = true"); - } - } //m_log.Debug(LogHeader + "HandleUpdateObjectBySynchronization: sog " + sog.Name + "," + sog.UUID); @@ -1901,16 +1873,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule SceneObjectGroup sog = SceneObjectSerializer.FromXml2Format(sogxml); lock (m_stats) m_statSOGBucketIn++; - //SYNC DEBUG - /* - string partnames = ""; - foreach (SceneObjectPart part in sog.Parts) - { - partnames += "(" + part.Name + ", " + part.UUID + ")"; - } - - m_log.Debug(LogHeader+" received "+msg.Type.ToString()+" from "+senderActorID+" about obj "+sog.Name+", "+sog.UUID);//+"; parts -- "+partnames); - * */ if (sog.IsDeleted) { @@ -1919,13 +1881,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule } else { - foreach (SceneObjectPart part in sog.Parts) - { - if (part.IsAttachment) - { - m_log.Debug(LogHeader + "HandleAddOrUpdateObjectBySynchronization: part " + part.Name + "," + part.UUID + ", IsAttachment = true"); - } - } Scene.ObjectUpdateResult updateResult = m_scene.AddOrUpdateObjectBySynchronization(sog); @@ -2008,21 +1963,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule data = null; } return data; - } - - /* - private void HandleAddNewObject(SceneObjectGroup sog) - { - //RegionSyncModule only add object to SceneGraph. Any actor specific actions will be implemented - //by each ActorSyncModule, which would be triggered its subcription to event SceneGraph.OnObjectCreate. - bool attachToBackup = false; - - if (m_scene.AddNewSceneObject(sog, attachToBackup)) - { - m_log.Debug(LogHeader + ": added obj " + sog.UUID); - } - } - * */ + } private void HandleRemovedObject(SymmetricSyncMessage msg, string senderActorID) { @@ -2053,12 +1994,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule { if (!softDelete) { - m_log.Debug(LogHeader + " hard delete object " + sog.UUID); + m_log.DebugFormat("{0}: hard delete object {1}", LogHeader, sog.UUID); m_scene.DeleteSceneObjectBySynchronization(sog); } else { - m_log.Debug(LogHeader + " soft delete object " + sog.UUID); + m_log.DebugFormat("{0}: soft delete object {1}", LogHeader, sog.UUID); m_scene.UnlinkSceneObject(sog, true); } } @@ -2097,17 +2038,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule childrenIDs.Add(data[partTempID].AsUUID()); } - m_log.Debug(LogHeader + " received LinkObject from " + senderActorID); - //m_log.Debug("LinkedObject: " + sogxml); - - //TEMP DEBUG - foreach (SceneObjectPart part in linkedGroup.Parts) - { - if (part.IsAttachment) - { - m_log.Debug(LogHeader + "HandleLinkObject: part " + part.Name + "," + part.UUID + " IsAttachment = true in incoming sync message"); - } - } + m_log.DebugFormat("{0}: received LinkObject from {1}", LogHeader, senderActorID); m_scene.LinkObjectBySync(linkedGroup, rootID, childrenIDs); @@ -2237,7 +2168,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule /// OSDMap data of event args private void HandleRemoteEvent_OnNewScript(string actorID, ulong evSeqNum, OSDMap data) { - m_log.Debug(LogHeader + ", " + m_actorID + ": received NewScript"); UUID agentID = data["agentID"].AsUUID(); UUID primID = data["primID"].AsUUID(); @@ -2264,7 +2194,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule if (updateResult == Scene.ObjectUpdateResult.Updated || updateResult == Scene.ObjectUpdateResult.New) { - m_log.Debug(LogHeader + ": TriggerNewScriptLocally"); //Next, trigger creating the new script SceneObjectPart localPart = m_scene.GetSceneObjectPart(primID); m_scene.EventManager.TriggerNewScriptLocally(agentID, localPart, itemID); @@ -2298,7 +2227,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule /// OSDMap data of event args private void HandleRemoteEvent_OnScriptReset(string actorID, ulong evSeqNum, OSDMap data) { - m_log.Debug(LogHeader + ", " + m_actorID + ": received ScriptReset"); + //m_log.Debug(LogHeader + ", " + m_actorID + ": received ScriptReset"); UUID agentID = data["agentID"].AsUUID(); UUID itemID = data["itemID"].AsUUID(); @@ -2567,7 +2496,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule /// the prim that contains the new script private void OnLocalNewScript(UUID clientID, SceneObjectPart part, UUID itemID) { - m_log.Debug(LogHeader + " RegionSyncModule_OnLocalNewScript"); + //m_log.Debug(LogHeader + " RegionSyncModule_OnLocalNewScript"); SceneObjectGroup sog = part.ParentGroup; if(sog==null){ @@ -2596,7 +2525,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule /// private void OnLocalUpdateScript(UUID agentID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) { - m_log.Debug(LogHeader + " RegionSyncModule_OnUpdateScript"); + //m_log.Debug(LogHeader + " RegionSyncModule_OnUpdateScript"); OSDMap data = new OSDMap(); data["agentID"] = OSD.FromUUID(agentID); diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c1ea8a3340..6d086d6844 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2203,13 +2203,6 @@ namespace OpenSim.Region.Framework.Scenes partnames += "(" + part.Name + ", " + part.UUID + ")"; } m_log.DebugFormat("[SCENE] RezObject {0} with InvItem name {1} at pos {2} with parts {3}", group.UUID.ToString(), item.Name, group.RootPart.GroupPosition.ToString(), partnames); - foreach (SceneObjectPart part in group.Parts) - { - if (part.IsAttachment) - { - m_log.Debug("[SCENE]: part " + part.Name + "," + part.UUID + ", IsAttachment = true"); - } - } // We can only call this after adding the scene object, since the scene object references the scene // to find out if scripts should be activated at all. diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 12a31b5f56..4f5687bfc8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -832,14 +832,6 @@ namespace OpenSim.Region.Framework.Scenes //Leverage the LinkObject implementation to get the book keeping of Group and Parts relations right m_sceneGraph.LinkObjectsBySync(root, children); - foreach (SceneObjectPart part in linkedGroup.Parts) - { - if (part.IsAttachment) - { - m_log.Debug("LinkObjectBySync: part " + part.Name + "," + part.UUID + " IsAttachment = true after linking"); - } - } - //The properties of the newly linked object should be updated later with another UpdatedObject message. diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ad5c3ae5ff..5e7e774c9e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5496,11 +5496,6 @@ namespace OpenSim.Region.Framework.Scenes // localPart.IsAttachment = updatedPart.IsAttachment; //} - if (localPart.IsAttachment) - { - m_log.Debug("GeneralBucketUpdateProcessor: part " + localPart.Name + "," + localPart.UUID + ", IsAttachment = true; previously, IsAttachment = " + preIsAttachment.ToString()); - } - localPart.AggregateScriptEvents = updatedPart.AggregateScriptEvents; aggregateScriptEventSubscriptions();