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) --- .../Region/ScriptEngine/DotNetEngine/AppDomainManager.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs index eeca143..d35e585 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs @@ -34,6 +34,7 @@ using System.Security.Policy; using System.Security.Permissions; using OpenSim.Region.ScriptEngine.Interfaces; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using log4net; namespace OpenSim.Region.ScriptEngine.DotNetEngine { @@ -51,6 +52,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // 4. Unload AppDomain completely when all scripts in it has stopped // + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private int maxScriptsPerAppDomain = 1; // Internal list of all AppDomains @@ -138,12 +141,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + AppDomainNameCount, null, ads); - m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + - "]: AppDomain Loading: " + - AssemblyName.GetAssemblyName( - "OpenSim.Region.ScriptEngine.Shared.dll").ToString()); + m_log.Info("[" + m_scriptEngine.ScriptEngineName + + "]: AppDomain Loading: " + + AssemblyName.GetAssemblyName( + "OpenSim.Region.ScriptEngine.Shared.dll").ToString()); AD.Load(AssemblyName.GetAssemblyName( - "OpenSim.Region.ScriptEngine.Shared.dll")); + "OpenSim.Region.ScriptEngine.Shared.dll")); // Return the new AppDomain return AD; -- cgit v1.1