diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index ee38306..afa1839 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
96 | break; | 96 | break; |
97 | default: | 97 | default: |
98 | MyThreadPriority = ThreadPriority.BelowNormal; // Default | 98 | MyThreadPriority = ThreadPriority.BelowNormal; // Default |
99 | eventQueueManager.m_ScriptEngine.Log.Error("ScriptEngineBase", "Unknown priority type \"" + pri + "\" in config file. Defaulting to \"BelowNormal\"."); | 99 | eventQueueManager.m_ScriptEngine.Log.Error("[ScriptEngineBase]: Unknown priority type \"" + pri + "\" in config file. Defaulting to \"BelowNormal\"."); |
100 | break; | 100 | break; |
101 | } | 101 | } |
102 | 102 | ||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
137 | } | 137 | } |
138 | catch (Exception) | 138 | catch (Exception) |
139 | { | 139 | { |
140 | //myScriptEngine.Log.Verbose(ScriptEngineName, "EventQueueManager Exception killing worker thread: " + e.ToString()); | 140 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Exception killing worker thread: " + e.ToString()); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | } | 143 | } |
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
147 | /// </summary> | 147 | /// </summary> |
148 | private void EventQueueThreadLoop() | 148 | private void EventQueueThreadLoop() |
149 | { | 149 | { |
150 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "EventQueueManager Worker thread spawned"); | 150 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread spawned"); |
151 | try | 151 | try |
152 | { | 152 | { |
153 | while (true) | 153 | while (true) |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
196 | else | 196 | else |
197 | { | 197 | { |
198 | // Something in queue, process | 198 | // Something in queue, process |
199 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); | 199 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); |
200 | 200 | ||
201 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD | 201 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD |
202 | lock (eventQueueManager.queueLock) | 202 | lock (eventQueueManager.queueLock) |
@@ -228,12 +228,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
228 | try | 228 | try |
229 | { | 229 | { |
230 | #if DEBUG | 230 | #if DEBUG |
231 | eventQueueManager.m_ScriptEngine.Log.Debug(ScriptEngineName, | 231 | eventQueueManager.m_ScriptEngine.Log.Debug("[" + ScriptEngineName + "]: " + |
232 | "Executing event:\r\n" | 232 | "Executing event:\r\n" |
233 | + "QIS.localID: " + QIS.localID | 233 | + "QIS.localID: " + QIS.localID |
234 | + ", QIS.itemID: " + QIS.itemID | 234 | + ", QIS.itemID: " + QIS.itemID |
235 | + ", QIS.functionName: " + | 235 | + ", QIS.functionName: " + |
236 | QIS.functionName); | 236 | QIS.functionName); |
237 | #endif | 237 | #endif |
238 | LastExecutionStarted = DateTime.Now.Ticks; | 238 | LastExecutionStarted = DateTime.Now.Ticks; |
239 | KillCurrentScript = false; | 239 | KillCurrentScript = false; |
@@ -284,9 +284,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
284 | //else | 284 | //else |
285 | //{ | 285 | //{ |
286 | // T oconsole | 286 | // T oconsole |
287 | eventQueueManager.m_ScriptEngine.Log.Error(ScriptEngineName, | 287 | eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: " + |
288 | "Unable to send text in-world:\r\n" + | 288 | "Unable to send text in-world:\r\n" + |
289 | text); | 289 | text); |
290 | } | 290 | } |
291 | finally | 291 | finally |
292 | { | 292 | { |
@@ -309,17 +309,17 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
309 | } | 309 | } |
310 | catch (ThreadAbortException tae) | 310 | catch (ThreadAbortException tae) |
311 | { | 311 | { |
312 | eventQueueManager.m_ScriptEngine.Log.Notice(ScriptEngineName, "ThreadAbortException while executing function."); | 312 | eventQueueManager.m_ScriptEngine.Log.Info("[" + ScriptEngineName + "]: ThreadAbortException while executing function."); |
313 | } | 313 | } |
314 | catch (Exception e) | 314 | catch (Exception e) |
315 | { | 315 | { |
316 | eventQueueManager.m_ScriptEngine.Log.Error(ScriptEngineName, "Exception in EventQueueThreadLoop: " + e.ToString()); | 316 | eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: Exception in EventQueueThreadLoop: " + e.ToString()); |
317 | } | 317 | } |
318 | } // while | 318 | } // while |
319 | } // try | 319 | } // try |
320 | catch (ThreadAbortException) | 320 | catch (ThreadAbortException) |
321 | { | 321 | { |
322 | //myScriptEngine.Log.Verbose(ScriptEngineName, "EventQueueManager Worker thread killed: " + tae.Message); | 322 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread killed: " + tae.Message); |
323 | } | 323 | } |
324 | } | 324 | } |
325 | 325 | ||