From 818af9d4827ea66358abbc3929d20e09861c7306 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 22 Feb 2009 01:26:18 +0000 Subject: Refactor log4net logger handling in script engine. (#3148) --- OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs index 56b4c8e..f10722b 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs @@ -25,22 +25,27 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System.Reflection; +using log4net; + namespace OpenSim.Region.ScriptEngine.DotNetEngine { public static class Common { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public static ScriptEngine mySE; // This class just contains some static log stuff used for debugging. public static void SendToDebug(string message) { - mySE.Log.Info("[" + mySE.ScriptEngineName + "]: Debug: " + message); + m_log.Info("[" + mySE.ScriptEngineName + "]: Debug: " + message); } public static void SendToLog(string message) { - mySE.Log.Info("[" + mySE.ScriptEngineName + "]: LOG: " + message); + m_log.Info("[" + mySE.ScriptEngineName + "]: LOG: " + message); } } } -- cgit v1.1