aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ScriptEngine/Shared
diff options
context:
space:
mode:
authorJeff Ames2009-02-22 01:26:18 +0000
committerJeff Ames2009-02-22 01:26:18 +0000
commit818af9d4827ea66358abbc3929d20e09861c7306 (patch)
tree097254f7d203fff8547c30061540bc01e4f84d12 /OpenSim/ScriptEngine/Shared
parentAddresses some issues with appearance after TPs. Appearance.Owner was not bei... (diff)
downloadopensim-SC_OLD-818af9d4827ea66358abbc3929d20e09861c7306.zip
opensim-SC_OLD-818af9d4827ea66358abbc3929d20e09861c7306.tar.gz
opensim-SC_OLD-818af9d4827ea66358abbc3929d20e09861c7306.tar.bz2
opensim-SC_OLD-818af9d4827ea66358abbc3929d20e09861c7306.tar.xz
Refactor log4net logger handling in script engine. (#3148)
Diffstat (limited to 'OpenSim/ScriptEngine/Shared')
-rw-r--r--OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs1
-rw-r--r--OpenSim/ScriptEngine/Shared/ScriptStructure.cs12
2 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs b/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs
index 693f38c..64b33d4 100644
--- a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs
+++ b/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs
@@ -48,7 +48,6 @@ namespace OpenSim.ScriptEngine.Shared
48 public Dictionary<string, IScriptCompiler> Compilers; 48 public Dictionary<string, IScriptCompiler> Compilers;
49 public Dictionary<string, IScriptScheduler> Schedulers; 49 public Dictionary<string, IScriptScheduler> Schedulers;
50 public Dictionary<string, IScriptCommandProvider> CommandProviders; 50 public Dictionary<string, IScriptCommandProvider> CommandProviders;
51 public ILog Logger;
52 51
53 public void Executors_Execute(EventParams p) 52 public void Executors_Execute(EventParams p)
54 { 53 {
diff --git a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs b/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
index 785040c..1095a8b 100644
--- a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
+++ b/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Text; 31using System.Text;
32using log4net;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Region.ScriptEngine.Interfaces; 34using OpenSim.Region.ScriptEngine.Interfaces;
34using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 35using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
@@ -38,6 +39,8 @@ namespace OpenSim.ScriptEngine.Shared
38{ 39{
39 public struct ScriptStructure 40 public struct ScriptStructure
40 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
41 public RegionInfoStructure RegionInfo; 44 public RegionInfoStructure RegionInfo;
42 public ScriptMetaData ScriptMetaData; 45 public ScriptMetaData ScriptMetaData;
43 46
@@ -91,8 +94,7 @@ namespace OpenSim.ScriptEngine.Shared
91 if (!InternalFunctions.ContainsKey(FunctionName)) 94 if (!InternalFunctions.ContainsKey(FunctionName))
92 { 95 {
93 // TODO: Send message in-world 96 // TODO: Send message in-world
94 //RegionInfo.Scene. 97 m_log.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName);
95 RegionInfo.Logger.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName);
96 return; 98 return;
97 } 99 }
98 100
@@ -103,7 +105,7 @@ namespace OpenSim.ScriptEngine.Shared
103 } 105 }
104 catch (Exception e) 106 catch (Exception e)
105 { 107 {
106 RegionInfo.Logger.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString()); 108 m_log.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString());
107 } 109 }
108 } 110 }
109 } 111 }
@@ -126,8 +128,8 @@ namespace OpenSim.ScriptEngine.Shared
126 if (!InternalFunctions.ContainsKey(mi.Name)) 128 if (!InternalFunctions.ContainsKey(mi.Name))
127 InternalFunctions.Add(mi.Name, Delegate.CreateDelegate(scriptObjectType, ScriptObject, mi)); 129 InternalFunctions.Add(mi.Name, Delegate.CreateDelegate(scriptObjectType, ScriptObject, mi));
128 else 130 else
129 RegionInfo.Logger.ErrorFormat("[{0}] Error: Script function \"{1}\" is already added. We do not support overloading.", 131 m_log.ErrorFormat("[{0}] Error: Script function \"{1}\" is already added. We do not support overloading.",
130 Name, mi.Name); 132 Name, mi.Name);
131 } 133 }
132 } 134 }
133 } 135 }