From 8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49 Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Sun, 22 Feb 2009 20:52:55 +0000
Subject: Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that: *
Added log4net dependency to physxplugin in prebuild.xml. * Added missing
m_log fields to classes. * Replaced Console.WriteLine with appropriate
m_log.Xxxx * Tested that nant test target runs succesfully. * Tested that
local opensim sandbox starts up without errors.
---
.../Framework/Scenes/ChildAgentDataUpdate.cs | 11 ++--
OpenSim/Region/Framework/Scenes/EntityBase.cs | 4 +-
.../Hypergrid/HGSceneCommunicationService.cs | 2 +-
.../Framework/Scenes/Scene.PacketHandlers.cs | 2 +-
OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++---
.../Framework/Scenes/SceneCommunicationService.cs | 14 ++---
OpenSim/Region/Framework/Scenes/SceneManager.cs | 2 +-
.../Framework/Scenes/SceneObjectGroup.Inventory.cs | 2 +-
.../Region/Framework/Scenes/SceneObjectGroup.cs | 2 +-
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 18 +++----
.../Framework/Scenes/SceneObjectPartInventory.cs | 2 +-
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 ++++++-------
.../Framework/Scenes/Scripting/NullScriptHost.cs | 6 ++-
.../Scenes/Scripting/ScriptEngineLoader.cs | 4 +-
.../Region/Framework/Scenes/SimStatsReporter.cs | 2 +-
.../Scenes/Tests/SceneObjectBasicTests.cs | 4 +-
.../Scenes/Tests/SceneObjectLinkingTests.cs | 60 ++++++++++++----------
.../Framework/Scenes/Types/BasicQuadTreeNode.cs | 2 +-
.../Region/Framework/Scenes/Types/UpdateQueue.cs | 4 +-
19 files changed, 100 insertions(+), 89 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
index 6bfa73b..38eceb1 100644
--- a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
+++ b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
@@ -31,6 +31,8 @@ using System.Collections.Generic;
using OpenSim.Framework;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
+using log4net;
+using System.Reflection;
namespace OpenSim.Region.Framework.Scenes
{
@@ -240,6 +242,7 @@ namespace OpenSim.Region.Framework.Scenes
public class AgentData : IAgentData
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private UUID m_id;
public UUID AgentID
{
@@ -496,10 +499,10 @@ namespace OpenSim.Region.Framework.Scenes
public void Dump()
{
- System.Console.WriteLine("------------ AgentData ------------");
- System.Console.WriteLine("UUID: " + AgentID);
- System.Console.WriteLine("Region: " + RegionHandle);
- System.Console.WriteLine("Position: " + Position);
+ m_log.Info("------------ AgentData ------------");
+ m_log.Info("UUID: " + AgentID);
+ m_log.Info("Region: " + RegionHandle);
+ m_log.Info("Position: " + Position);
}
}
diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs
index 5055e44..fb5c0d1 100644
--- a/OpenSim/Region/Framework/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Framework.Scenes
protected EntityBase(SerializationInfo info, StreamingContext context)
{
- //System.Console.WriteLine("EntityBase Deserialize BGN");
+ //m_log.Debug("EntityBase Deserialize BGN");
if (info == null)
{
@@ -187,7 +187,7 @@ namespace OpenSim.Region.Framework.Scenes
m_localId = (uint)info.GetValue("m_localId", typeof(uint));
- //System.Console.WriteLine("EntityBase Deserialize END");
+ //m_log.Debug("EntityBase Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
index 0faeef1..67cc1a1 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
{
isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile);
realHandle = m_hg.FindRegionHandle(regionHandle);
- Console.WriteLine("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
+ m_log.Debug("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
}
///
/// Hypergrid mod stop
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 039b81b..db322b4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -358,7 +358,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (ownerID == CommsManager.UserProfileCacheService.LibraryRoot.Owner)
{
- //Console.WriteLine("request info for library item");
+ //m_log.Debug("request info for library item");
return;
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 659aaa6..2a3f068 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1538,7 +1538,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp, bool silent)
{
- //Console.WriteLine(" >>> CrossPrimGroupIntoNewRegion <<<");
+ //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
bool successYN = false;
grp.RootPart.UpdateFlag = 0;
@@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool IncomingCreateObject(ISceneObject sog)
{
- //Console.WriteLine(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
+ //m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
SceneObjectGroup newObject;
try
{
@@ -2482,7 +2482,7 @@ namespace OpenSim.Region.Framework.Scenes
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
{
- //Console.WriteLine(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
+ //m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null)
{
@@ -2924,7 +2924,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public void HandleEditCommand(string[] cmdparams)
{
- Console.WriteLine("Searching for Primitive: '" + cmdparams[2] + "'");
+ m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'");
List EntityList = GetEntities();
@@ -2941,7 +2941,7 @@ namespace OpenSim.Region.Framework.Scenes
new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]),
Convert.ToSingle(cmdparams[5])));
- Console.WriteLine("Edited scale of Primitive: " + part.Name);
+ m_log.Debug("Edited scale of Primitive: " + part.Name);
}
}
}
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.Framework.Scenes
public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
{
- //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
+ //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 9a6bd87..c3b60f8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -372,7 +372,7 @@ namespace OpenSim.Region.Framework.Scenes
Dictionary seeds
= new Dictionary(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID));
- //Console.WriteLine(" !!! No. of seeds: " + seeds.Count);
+ //m_log.Debug(" !!! No. of seeds: " + seeds.Count);
if (!seeds.ContainsKey(avatar.Scene.RegionInfo.RegionHandle))
seeds.Add(avatar.Scene.RegionInfo.RegionHandle, avatar.ControllingClient.RequestClientInfo().CapsPath);
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Framework.Scenes
int count = 20;
while (m_agentsInTransit.Contains(id) && count-- > 0)
{
- //Console.WriteLine(" >>> Waiting... " + count);
+ //m_log.Debug(" >>> Waiting... " + count);
Thread.Sleep(1000);
}
@@ -966,7 +966,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool ReleaseAgent(UUID id)
{
- //Console.WriteLine(" >>> ReleaseAgent called <<< ");
+ //m_log.Debug(" >>> ReleaseAgent called <<< ");
return ResetFromTransit(id);
}
@@ -1104,7 +1104,7 @@ namespace OpenSim.Region.Framework.Scenes
//AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
agent.ControllingClient.RequestClientInfo();
- //Console.WriteLine("BEFORE CROSS");
+ //m_log.Debug("BEFORE CROSS");
//Scene.DumpChildrenSeeds(UUID);
//DumpKnownRegions();
string agentcaps;
@@ -1162,7 +1162,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- //Console.WriteLine("AFTER CROSS");
+ //m_log.Debug("AFTER CROSS");
//Scene.DumpChildrenSeeds(UUID);
//DumpKnownRegions();
return agent;
@@ -1252,14 +1252,14 @@ namespace OpenSim.Region.Framework.Scenes
// private void Dump(string msg, List handles)
// {
-// Console.WriteLine("-------------- HANDLE DUMP ({0}) ---------", msg);
+// m_log.Info"-------------- HANDLE DUMP ({0}) ---------", msg);
// foreach (ulong handle in handles)
// {
// uint x, y;
// Utils.LongToUInts(handle, out x, out y);
// x = x / Constants.RegionSize;
// y = y / Constants.RegionSize;
-// Console.WriteLine("({0}, {1})", x, y);
+// m_log.Info("({0}, {1})", x, y);
// }
// }
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 00b49a1..07c77aa 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool TrySetCurrentScene(UUID regionID)
{
- Console.WriteLine("Searching for Region: '{0}'", regionID.ToString());
+ m_log.Debug("Searching for Region: '" + regionID + "'");
foreach (Scene scene in m_localScenes)
{
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 7d36a63..5c47710 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes
public string GetStateSnapshot()
{
- //Console.WriteLine(" >>> GetStateSnapshot <<<");
+ //m_log.Debug(" >>> GetStateSnapshot <<<");
List assemblies = new List();
Dictionary states = new Dictionary();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 69bc554..d1aef1c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -526,7 +526,7 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
- Console.WriteLine("found unexpected element: " + reader.Name);
+ m_log.Warn("found unexpected element: " + reader.Name);
reader.Read();
}
break;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 27c22eb..1470191 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Framework.Scenes
protected SceneObjectPart(SerializationInfo info, StreamingContext context)
{
- //System.Console.WriteLine("SceneObjectPart Deserialize BGN");
+ //m_log.Debug("SceneObjectPart Deserialize BGN");
m_TextureAnimation = new byte[0];
m_particleSystem = new byte[0];
if (info == null)
@@ -333,7 +333,7 @@ namespace OpenSim.Region.Framework.Scenes
m_ids = (List)info.GetValue("m_ids", typeof(List));
*/
- //System.Console.WriteLine("SceneObjectPart Deserialize END");
+ //m_log.Debug("SceneObjectPart Deserialize END");
Rezzed = DateTime.Now;
m_inventory = new SceneObjectPartInventory(this);
@@ -534,7 +534,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- Console.WriteLine("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
+ m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
}
}
@@ -619,7 +619,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception ex)
{
- Console.WriteLine("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
+ m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
}
}
@@ -1121,13 +1121,13 @@ if (m_shape != null) {
// PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) == 0)
{
- //Console.WriteLine("Adding flag: " + ((PrimFlags) flag).ToString());
+ //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
_flags |= flag;
if (flag == PrimFlags.TemporaryOnRez)
ResetExpire();
}
- // System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
+ // m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
}
///
@@ -2197,10 +2197,10 @@ if (m_shape != null) {
// PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) != 0)
{
- //Console.WriteLine("Removing flag: " + ((PrimFlags)flag).ToString());
+ //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString());
_flags &= ~flag;
}
- //System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
+ //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//ScheduleFullUpdate();
}
@@ -3552,7 +3552,7 @@ if (m_shape != null) {
{
RemFlag(PrimFlags.TemporaryOnRez);
}
- // System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
+ // m_log.Debug("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index c625a72..9666525 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -666,7 +666,7 @@ namespace OpenSim.Region.Framework.Scenes
fileData = Utils.StringToBytes(invString.BuildString);
- //Console.WriteLine(Utils.BytesToString(fileData));
+ //m_log.Debug(Utils.BytesToString(fileData));
//m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Utils.BytesToString(fileData));
if (fileData.Length > 2)
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 429b615..dd8c719 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes
{
// ~ScenePresence()
// {
-// System.Console.WriteLine("[ScenePresence] Destructor called");
+// m_log.Debug("[ScenePresence] Destructor called");
// }
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -409,7 +409,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- Console.WriteLine("[SCENEPRESENCE]: ABSOLUTE POSITION " + e.Message);
+ m_log.Error("[SCENEPRESENCE]: ABSOLUTE POSITION " + e.Message);
}
}
@@ -449,7 +449,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
- Console.WriteLine("[SCENEPRESENCE]: VELOCITY " + e.Message);
+ m_log.Error("[SCENEPRESENCE]: VELOCITY " + e.Message);
}
}
@@ -525,20 +525,20 @@ namespace OpenSim.Region.Framework.Scenes
DropOldNeighbours(old);
Scene.CapsModule.SetChildrenSeed(UUID, seeds);
KnownRegions = seeds;
- //Console.WriteLine(" ++++++++++AFTER+++++++++++++ ");
+ //m_log.Debug(" ++++++++++AFTER+++++++++++++ ");
//DumpKnownRegions();
}
public void DumpKnownRegions()
{
- Console.WriteLine("================ KnownRegions {0} ================", Scene.RegionInfo.RegionName);
+ m_log.Info("================ KnownRegions "+Scene.RegionInfo.RegionName+" ================");
foreach (KeyValuePair kvp in KnownRegions)
{
uint x, y;
Utils.LongToUInts(kvp.Key, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
- Console.WriteLine(" >> {0}, {1}: {2}", x, y, kvp.Value);
+ m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
}
}
@@ -991,7 +991,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_knownChildRegions.ContainsKey(regionHandle))
{
m_knownChildRegions.Remove(regionHandle);
- //Console.WriteLine(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
+ //m_log.Debug(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
}
}
}
@@ -1066,7 +1066,7 @@ namespace OpenSim.Region.Framework.Scenes
{
//if (m_isChildAgent)
//{
- // // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent");
+ // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent");
// return;
//}
@@ -1406,7 +1406,7 @@ namespace OpenSim.Region.Framework.Scenes
catch (Exception ex)
{
//Why did I get this error?
- Console.WriteLine("[SCENEPRESENCE]: DoMoveToPosition" + ex.ToString());
+ m_log.Error("[SCENEPRESENCE]: DoMoveToPosition" + ex.ToString());
}
}
@@ -1923,7 +1923,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (m_isChildAgent)
{
- Console.WriteLine("DEBUG: AddNewMovement: child agent");
+ m_log.Debug("DEBUG: AddNewMovement: child agent");
return;
}
@@ -2507,8 +2507,8 @@ namespace OpenSim.Region.Framework.Scenes
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
- //Console.WriteLine("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
- //Console.WriteLine("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
+ //m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
+ //m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
if (Util.IsOutsideView(x, newRegionX, y, newRegionY))
{
byebyeRegions.Add(handle);
@@ -2561,7 +2561,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ChildAgentDataUpdate(AgentData cAgentData)
{
- //Console.WriteLine(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
+ //m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
if (!IsChildAgent)
return;
@@ -2577,7 +2577,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!IsChildAgent)
return;
- //Console.WriteLine(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY);
+ //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY);
int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize;
int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize;
@@ -2816,7 +2816,7 @@ namespace OpenSim.Region.Framework.Scenes
protected ScenePartUpdate(SerializationInfo info, StreamingContext context)
{
- //System.Console.WriteLine("ScenePartUpdate Deserialize BGN");
+ //m_log.Debug("ScenePartUpdate Deserialize BGN");
if (info == null)
{
@@ -2827,7 +2827,7 @@ namespace OpenSim.Region.Framework.Scenes
LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint));
LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint));
- //System.Console.WriteLine("ScenePartUpdate Deserialize END");
+ //m_log.Debug("ScenePartUpdate Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,
@@ -3084,7 +3084,7 @@ namespace OpenSim.Region.Framework.Scenes
protected ScenePresence(SerializationInfo info, StreamingContext context)
: base (info, context)
{
- //System.Console.WriteLine("ScenePresence Deserialize BGN");
+ //m_log.Debug("ScenePresence Deserialize BGN");
if (info == null)
{
@@ -3239,7 +3239,7 @@ namespace OpenSim.Region.Framework.Scenes
m_state = (byte)info.GetValue("m_state", typeof(byte));
- //System.Console.WriteLine("ScenePresence Deserialize END");
+ //m_log.Debug("ScenePresence Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,
diff --git a/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs b/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs
index fd7ff96..93bbf32 100644
--- a/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs
+++ b/OpenSim/Region/Framework/Scenes/Scripting/NullScriptHost.cs
@@ -27,11 +27,15 @@
using System;
using OpenMetaverse;
+using log4net;
+using System.Reflection;
namespace OpenSim.Region.Framework.Scenes.Scripting
{
public class NullScriptHost : IScriptHost
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private Vector3 m_pos = new Vector3(128, 128, 30);
public string Name
@@ -80,7 +84,7 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
public void SetText(string text, Vector3 color, double alpha)
{
- Console.WriteLine("Tried to SetText [{0}] on NullScriptHost", text);
+ m_log.Warn("Tried to SetText "+text+" on NullScriptHost");
}
}
}
diff --git a/OpenSim/Region/Framework/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Framework/Scenes/Scripting/ScriptEngineLoader.cs
index 58228cc..79ffe44 100644
--- a/OpenSim/Region/Framework/Scenes/Scripting/ScriptEngineLoader.cs
+++ b/OpenSim/Region/Framework/Scenes/Scripting/ScriptEngineLoader.cs
@@ -87,10 +87,10 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
//}
- //Console.WriteLine("Loading: " + FileName);
+ //m_log.Debug("Loading: " + FileName);
//foreach (Type _t in a.GetTypes())
//{
- // Console.WriteLine("Type: " + _t.ToString());
+ // m_log.Debug("Type: " + _t.ToString());
//}
Type t;
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index b2cea5d..039e9a7 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();
// Know what's not thread safe in Mono... modifying timers.
- // System.Console.WriteLine("Firing Stats Heart Beat");
+ // m_log.Debug("Firing Stats Heart Beat");
lock (m_report)
{
uint regionFlags = 0;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 096b2cb..c984c7d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
- //System.Console.WriteLine("retrievedPart : {0}", retrievedPart);
+ //m_log.Debug("retrievedPart : {0}", retrievedPart);
// If the parts have the same UUID then we will consider them as one and the same
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
}
@@ -136,4 +136,4 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
Assert.That(retrievedPart, Is.Null);
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
index 3e0f48f..b5dbb38 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
@@ -36,6 +36,8 @@ using OpenSim.Region.Communications.Local;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common.Mock;
using OpenSim.Tests.Common.Setup;
+using log4net;
+using System.Reflection;
namespace OpenSim.Region.CoreModules.Scenes.Tests
{
@@ -45,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
[TestFixture]
public class SceneObjectLinkingTests
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
[Test]
public void TestLinkDelink2SceneObjects()
{
@@ -80,10 +84,10 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
if (debugtest)
{
- System.Console.WriteLine("parts: {0}", grp1.Children.Count);
- System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
- System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
- System.Console.WriteLine("Group1: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.OffsetPosition, part2.RotationOffset);
+ m_log.Debug("parts: " + grp1.Children.Count);
+ m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation);
+ m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset);
+ m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset);
}
// root part should have no offset position or rotation
@@ -101,13 +105,13 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
- System.Console.WriteLine(rotEuler1);
+ m_log.Debug(rotEuler1);
part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
- System.Console.WriteLine(rotEuler2);
+ m_log.Debug(rotEuler2);
Assert.That(rotEuler2.ApproxEquals(new Vector3(-180, 0, 0), 0.001f) || rotEuler2.ApproxEquals(new Vector3(180, 0, 0), 0.001f));
@@ -115,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
grp1.DelinkFromGroup(part2.LocalId);
if (debugtest)
- System.Console.WriteLine("Group2: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.AbsolutePosition, part2.RotationOffset);
+ m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset);
Assert.That(grp1.Children.Count, Is.EqualTo(1), "Group 1 still contained part2 after delink.");
Assert.That(part2.AbsolutePosition == Vector3.Zero);
@@ -175,16 +179,16 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
if (debugtest)
{
- System.Console.WriteLine("--------After Link-------");
- System.Console.WriteLine("Group1: parts: {0}", grp1.Children.Count);
- System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
- System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
- System.Console.WriteLine("Group1: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.OffsetPosition, part2.RotationOffset);
+ m_log.Debug("--------After Link-------");
+ m_log.Debug("Group1: parts:" + grp1.Children.Count);
+ m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation);
+ m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset);
+ m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset);
- System.Console.WriteLine("Group3: parts: {0}", grp3.Children.Count);
- System.Console.WriteLine("Group3: Pos:{0}, Rot:{1}", grp3.AbsolutePosition, grp3.Rotation);
- System.Console.WriteLine("Group3: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part3.OffsetPosition, part3.RotationOffset);
- System.Console.WriteLine("Group3: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part4.OffsetPosition, part4.RotationOffset);
+ m_log.Debug("Group3: parts:"+grp3.Children.Count);
+ m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation);
+ m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset);
+ m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset);
}
// Required for linking
@@ -206,13 +210,13 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
- System.Console.WriteLine(rotEuler1);
+ m_log.Debug(rotEuler1);
part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
- System.Console.WriteLine(rotEuler2);
+ m_log.Debug(rotEuler2);
Assert.That(rotEuler2.ApproxEquals(new Vector3(-180, 0, 0), 0.001f) || rotEuler2.ApproxEquals(new Vector3(180, 0, 0), 0.001f));
@@ -225,16 +229,16 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
if (debugtest)
{
- System.Console.WriteLine("--------After De-Link-------");
- System.Console.WriteLine("Group1: parts: {0}", grp1.Children.Count);
- System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
- System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
- System.Console.WriteLine("NoGroup: Prim2: AbsolutePosition:{0}, OffsetRotation:{1}", part2.AbsolutePosition, part2.RotationOffset);
-
- System.Console.WriteLine("Group3: parts: {0}", grp3.Children.Count);
- System.Console.WriteLine("Group3: Pos:{0}, Rot:{1}", grp3.AbsolutePosition, grp3.Rotation);
- System.Console.WriteLine("Group3: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part3.OffsetPosition, part3.RotationOffset);
- System.Console.WriteLine("Group3: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part4.OffsetPosition, part4.RotationOffset);
+ m_log.Debug("--------After De-Link-------");
+ m_log.Debug("Group1: parts:" + grp1.Children.Count);
+ m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.Rotation);
+ m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset);
+ m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset);
+
+ m_log.Debug("Group3: parts:" + grp3.Children.Count);
+ m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.Rotation);
+ m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset);
+ m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset);
}
Assert.That(part2.AbsolutePosition == Vector3.Zero);
diff --git a/OpenSim/Region/Framework/Scenes/Types/BasicQuadTreeNode.cs b/OpenSim/Region/Framework/Scenes/Types/BasicQuadTreeNode.cs
index 9fbbb15..f23fc06 100644
--- a/OpenSim/Region/Framework/Scenes/Types/BasicQuadTreeNode.cs
+++ b/OpenSim/Region/Framework/Scenes/Types/BasicQuadTreeNode.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
m_leftY = leftY;
m_width = width;
m_height = height;
- // Console.WriteLine("creating quadtree node " + m_quadID);
+ // m_log.Debug("creating quadtree node " + m_quadID);
}
public void AddObject(SceneObjectGroup obj)
diff --git a/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs b/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs
index 452ada9..2b7611f 100644
--- a/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs
+++ b/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
protected UpdateQueue(SerializationInfo info, StreamingContext context)
{
- //System.Console.WriteLine("UpdateQueue Deserialize BGN");
+ //m_log.Debug("UpdateQueue Deserialize BGN");
if (info == null)
{
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
m_ids.Add(new UUID(guid));
}
- //System.Console.WriteLine("UpdateQueue Deserialize END");
+ //m_log.Debug("UpdateQueue Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,
--
cgit v1.1