From 6ed5283bc06a62f38eb517e67b975832b603bf61 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 5 Feb 2008 19:44:27 +0000 Subject: Converted logging to use log4net. Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done. --- .../ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ExtensionsScriptModule/Engines/CSharp') diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs index b625f43..03d478f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs @@ -35,6 +35,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp { public class CSharpScriptEngine : IScriptCompiler { + private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + public string FileExt() { return ".cs"; @@ -58,10 +60,10 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp if (compilerResults.Errors.Count > 0) { - MainLog.Instance.Error("Compile errors"); + m_log.Error("Compile errors"); foreach (CompilerError error in compilerResults.Errors) { - MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); + m_log.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); } } else -- cgit v1.1