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/DotNetEngine/EventQueueManager.cs | |
parent | Addresses some issues with appearance after TPs. Appearance.Owner was not bei... (diff) | |
download | opensim-SC-818af9d4827ea66358abbc3929d20e09861c7306.zip opensim-SC-818af9d4827ea66358abbc3929d20e09861c7306.tar.gz opensim-SC-818af9d4827ea66358abbc3929d20e09861c7306.tar.bz2 opensim-SC-818af9d4827ea66358abbc3929d20e09861c7306.tar.xz |
Refactor log4net logger handling in script engine. (#3148)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs index 4a094e2..31c0d4d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs | |||
@@ -28,8 +28,10 @@ | |||
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.Region.ScriptEngine.Shared; | 33 | using OpenSim.Region.ScriptEngine.Shared; |
34 | using log4net; | ||
33 | 35 | ||
34 | namespace OpenSim.Region.ScriptEngine.DotNetEngine | 36 | namespace OpenSim.Region.ScriptEngine.DotNetEngine |
35 | { | 37 | { |
@@ -58,6 +60,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
58 | // Not noticeable unless server is under high load. | 60 | // Not noticeable unless server is under high load. |
59 | // | 61 | // |
60 | 62 | ||
63 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
64 | |||
61 | public ScriptEngine m_ScriptEngine; | 65 | public ScriptEngine m_ScriptEngine; |
62 | 66 | ||
63 | /// <summary> | 67 | /// <summary> |
@@ -211,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
211 | { | 215 | { |
212 | EventQueueThreadClass eqtc = new EventQueueThreadClass(); | 216 | EventQueueThreadClass eqtc = new EventQueueThreadClass(); |
213 | eventQueueThreads.Add(eqtc); | 217 | eventQueueThreads.Add(eqtc); |
214 | //m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Started new script execution thread. Current thread count: " + eventQueueThreads.Count); | 218 | //m_log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Started new script execution thread. Current thread count: " + eventQueueThreads.Count); |
215 | } | 219 | } |
216 | 220 | ||
217 | private void AbortThreadClass(EventQueueThreadClass threadClass) | 221 | private void AbortThreadClass(EventQueueThreadClass threadClass) |
@@ -225,10 +229,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
225 | } | 229 | } |
226 | catch (Exception) | 230 | catch (Exception) |
227 | { | 231 | { |
228 | //m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: If you see this, could you please report it to Tedd:"); | 232 | //m_log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: If you see this, could you please report it to Tedd:"); |
229 | //m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: Script thread execution timeout kill ended in exception: " + ex.ToString()); | 233 | //m_log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: Script thread execution timeout kill ended in exception: " + ex.ToString()); |
230 | } | 234 | } |
231 | //m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); | 235 | //m_log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); |
232 | } | 236 | } |
233 | #endregion | 237 | #endregion |
234 | 238 | ||
@@ -346,8 +350,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
346 | { | 350 | { |
347 | if (eventQueue.Count >= EventExecutionMaxQueueSize) | 351 | if (eventQueue.Count >= EventExecutionMaxQueueSize) |
348 | { | 352 | { |
349 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); | 353 | m_log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); |
350 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 354 | m_log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
351 | return false; | 355 | return false; |
352 | } | 356 | } |
353 | 357 | ||