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. --- OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/PhysXPlugin') diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 18935fb..5579848 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -32,6 +32,8 @@ using OpenSim.Framework; using OpenSim.Region.Physics.Manager; using PhysXWrapper; using Quaternion=OpenMetaverse.Quaternion; +using System.Reflection; +using log4net; namespace OpenSim.Region.Physics.PhysXPlugin { @@ -40,6 +42,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin /// public class PhysXPlugin : IPhysicsPlugin { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private PhysXScene _mScene; public PhysXPlugin() @@ -72,6 +75,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin public class PhysXScene : PhysicsScene { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private List _characters = new List(); private List _prims = new List(); private float[] _heightMap = null; @@ -84,7 +88,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin //sceneIdentifier = _sceneIdentifier; mySdk = NxPhysicsSDK.CreateSDK(); - Console.WriteLine("Sdk created - now creating scene"); + m_log.Info("Sdk created - now creating scene"); scene = mySdk.CreateScene(); } @@ -174,7 +178,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin } catch (Exception e) { - Console.WriteLine(e.Message); + m_log.Error(e.Message); } return fps; } @@ -193,7 +197,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin { if (_heightMap != null) { - Console.WriteLine("PhysX - deleting old terrain"); + m_log.Debug("PhysX - deleting old terrain"); scene.DeleteTerrain(); } _heightMap = heightMap; -- cgit v1.1