diff options
author | Jeff Ames | 2009-02-22 01:26:18 +0000 |
---|---|---|
committer | Jeff Ames | 2009-02-22 01:26:18 +0000 |
commit | 818af9d4827ea66358abbc3929d20e09861c7306 (patch) | |
tree | 097254f7d203fff8547c30061540bc01e4f84d12 /OpenSim/Region/ScriptEngine/XEngine | |
parent | Addresses some issues with appearance after TPs. Appearance.Owner was not bei... (diff) | |
download | opensim-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/Region/ScriptEngine/XEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 2632948..b1b82e5 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | ||
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
33 | using OpenSim.Region.CoreModules.Avatar.Currency.SampleMoney; | 34 | using OpenSim.Region.CoreModules.Avatar.Currency.SampleMoney; |
@@ -35,6 +36,7 @@ using OpenSim.Region.Framework.Scenes; | |||
35 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.ScriptEngine.Shared; | 37 | using OpenSim.Region.ScriptEngine.Shared; |
37 | using OpenSim.Region.ScriptEngine.Interfaces; | 38 | using OpenSim.Region.ScriptEngine.Interfaces; |
39 | using log4net; | ||
38 | 40 | ||
39 | namespace OpenSim.Region.ScriptEngine.XEngine | 41 | namespace OpenSim.Region.ScriptEngine.XEngine |
40 | { | 42 | { |
@@ -43,13 +45,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
43 | /// </summary> | 45 | /// </summary> |
44 | public class EventManager | 46 | public class EventManager |
45 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
46 | private XEngine myScriptEngine; | 50 | private XEngine myScriptEngine; |
47 | 51 | ||
48 | public EventManager(XEngine _ScriptEngine) | 52 | public EventManager(XEngine _ScriptEngine) |
49 | { | 53 | { |
50 | myScriptEngine = _ScriptEngine; | 54 | myScriptEngine = _ScriptEngine; |
51 | 55 | ||
52 | myScriptEngine.Log.Info("[XEngine] Hooking up to server events"); | 56 | m_log.Info("[XEngine] Hooking up to server events"); |
53 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 57 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
54 | myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end; | 58 | myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end; |
55 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; | 59 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 7a36bc2..75d0bec 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -125,11 +125,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
125 | get { return m_Scene; } | 125 | get { return m_Scene; } |
126 | } | 126 | } |
127 | 127 | ||
128 | public ILog Log | ||
129 | { | ||
130 | get { return m_log; } | ||
131 | } | ||
132 | |||
133 | public static List<XEngine> ScriptEngines | 128 | public static List<XEngine> ScriptEngines |
134 | { | 129 | { |
135 | get { return m_ScriptEngines; } | 130 | get { return m_ScriptEngines; } |
@@ -483,7 +478,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
483 | SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); | 478 | SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); |
484 | if (part == null) | 479 | if (part == null) |
485 | { | 480 | { |
486 | Log.Error("[Script] SceneObjectPart unavailable. Script NOT started."); | 481 | m_log.Error("[Script] SceneObjectPart unavailable. Script NOT started."); |
487 | m_ScriptErrorMessage += "SceneObjectPart unavailable. Script NOT started.\n"; | 482 | m_ScriptErrorMessage += "SceneObjectPart unavailable. Script NOT started.\n"; |
488 | m_ScriptFailCount++; | 483 | m_ScriptFailCount++; |
489 | return false; | 484 | return false; |