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. --- .../Components/DotNetEngine/Scheduler/BaseClassFactory.cs | 4 ++-- OpenSim/ScriptEngine/Shared/EventParams.cs | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim/ScriptEngine') diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs index 93f29d7..3259686 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs @@ -108,7 +108,7 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler // ilgen.Emit(OpCodes.Call, typeof(string).GetMethod //("Format", new Type[] { typeof(string), typeof(object) })); - // // Console.WriteLine("Hello, World!"); + // // m_log.Debug("Hello, World!"); // // // ilgen.Emit(OpCodes.Call, typeof(Console).GetMethod // ("WriteLine", new Type[] { typeof(string) })); @@ -237,4 +237,4 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler //string a = ""; } } -} \ No newline at end of file +} diff --git a/OpenSim/ScriptEngine/Shared/EventParams.cs b/OpenSim/ScriptEngine/Shared/EventParams.cs index 0962aec..28eaa58 100644 --- a/OpenSim/ScriptEngine/Shared/EventParams.cs +++ b/OpenSim/ScriptEngine/Shared/EventParams.cs @@ -30,6 +30,8 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; using OpenSim.Region.ScriptEngine.Shared; +using log4net; +using System.Reflection; namespace OpenSim.ScriptEngine.Shared { @@ -38,6 +40,7 @@ namespace OpenSim.ScriptEngine.Shared /// public class EventParams { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string EventName; public Object[] Params; public Region.ScriptEngine.Shared.DetectParams[] DetectParams; @@ -66,9 +69,14 @@ namespace OpenSim.ScriptEngine.Shared } public void test2(string functionName, params object[] args) { - System.Console.WriteLine(functionName, args); + String logMessage = functionName; + foreach (object arg in args) + { + logMessage +=", "+arg; + } + m_log.Debug(logMessage); } } -} \ No newline at end of file +} -- cgit v1.1