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. --- .../Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs index 5a9b0aa..9cdffaa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs @@ -36,6 +36,7 @@ using System.Reflection; using System.Net.Sockets; using System.Text; using System.Text.RegularExpressions; +using log4net; namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog { @@ -45,6 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog /// public class YP { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static Fail _fail = new Fail(); private static Repeat _repeat = new Repeat(); private static Dictionary> _predicatesStore = @@ -2341,7 +2343,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog string results = ""; for (Match m = Regex.Match(inData,inPattern); m.Success; m=m.NextMatch()) { - //Console.WriteLine( m ); + //m_log.Debug( m ); results += presep+ m + postsep; } return results; @@ -2359,7 +2361,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog } catch { - Console.WriteLine("Failed to connect to server at {0}:999", "localhost"); + m_log.Error("Failed to connect to server at localhost:999"); return ""; } @@ -2379,16 +2381,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog streamWriter.Flush(); cycOutputString = streamReader.ReadLine(); - Console.WriteLine("Cycoutput:" + cycOutputString); + m_log.Debug("Cycoutput:" + cycOutputString); //streamWriter.WriteLine("Client Message"); - //Console.WriteLine("Client Message"); + //m_log.Debug("Client Message"); streamWriter.Flush(); } } catch { - Console.WriteLine("Exception reading from Server"); + m_log.Error("Exception reading from Server"); return ""; } // tidy up -- cgit v1.1