aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
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/Region/ScriptEngine/Shared/Instance
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/Region/ScriptEngine/Shared/Instance')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 20e70d0..c1d6f8e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -265,7 +265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
265 } 265 }
266 catch (Exception e) 266 catch (Exception e)
267 { 267 {
268 m_Engine.Log.ErrorFormat("[Script] Error loading assembly {0}\n"+e.ToString(), assembly); 268 m_log.ErrorFormat("[Script] Error loading assembly {0}\n"+e.ToString(), assembly);
269 } 269 }
270 270
271 try 271 try
@@ -275,14 +275,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
275 m_Script.InitApi(kv.Key, kv.Value); 275 m_Script.InitApi(kv.Key, kv.Value);
276 } 276 }
277 277
278// m_Engine.Log.Debug("[Script] Script instance created"); 278// m_log.Debug("[Script] Script instance created");
279 279
280 part.SetScriptEvents(m_ItemID, 280 part.SetScriptEvents(m_ItemID,
281 (int)m_Script.GetStateEventFlags(State)); 281 (int)m_Script.GetStateEventFlags(State));
282 } 282 }
283 catch (Exception e) 283 catch (Exception e)
284 { 284 {
285 m_Engine.Log.Error("[Script] Error loading script instance\n"+e.ToString()); 285 m_log.Error("[Script] Error loading script instance\n"+e.ToString());
286 return; 286 return;
287 } 287 }
288 288
@@ -317,7 +317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
317 m_LocalID, m_ItemID, m_ObjectID, 317 m_LocalID, m_ItemID, m_ObjectID,
318 PluginData); 318 PluginData);
319 319
320// m_Engine.Log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName); 320// m_log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName);
321 321
322 part.SetScriptEvents(m_ItemID, 322 part.SetScriptEvents(m_ItemID,
323 (int)m_Script.GetStateEventFlags(State)); 323 (int)m_Script.GetStateEventFlags(State));
@@ -344,12 +344,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
344 } 344 }
345 else 345 else
346 { 346 {
347 m_Engine.Log.Error("[Script] Unable to load script state: Memory limit exceeded"); 347 m_log.Error("[Script] Unable to load script state: Memory limit exceeded");
348 } 348 }
349 } 349 }
350 catch (Exception e) 350 catch (Exception e)
351 { 351 {
352 m_Engine.Log.ErrorFormat("[Script] Unable to load script state from xml: {0}\n"+e.ToString(), xml); 352 m_log.ErrorFormat("[Script] Unable to load script state from xml: {0}\n"+e.ToString(), xml);
353 } 353 }
354 } 354 }
355 else 355 else
@@ -359,7 +359,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
359 if (presence != null && (!postOnRez)) 359 if (presence != null && (!postOnRez))
360 presence.ControllingClient.SendAgentAlertMessage("Compile successful", false); 360 presence.ControllingClient.SendAgentAlertMessage("Compile successful", false);
361 361
362// m_Engine.Log.ErrorFormat("[Script] Unable to load script state, file not found"); 362// m_log.ErrorFormat("[Script] Unable to load script state, file not found");
363 } 363 }
364 } 364 }
365 365
@@ -378,7 +378,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
378 378
379 if (m_stateSource == StateSource.NewRez) 379 if (m_stateSource == StateSource.NewRez)
380 { 380 {
381// m_Engine.Log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script"); 381// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
382 PostEvent(new EventParams("changed", 382 PostEvent(new EventParams("changed",
383 new Object[] {new LSL_Types.LSLInteger(256)}, new DetectParams[0])); 383 new Object[] {new LSL_Types.LSLInteger(256)}, new DetectParams[0]));
384 } 384 }
@@ -473,7 +473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
473 if (m_CurrentResult == null) 473 if (m_CurrentResult == null)
474 m_CurrentResult = m_Engine.QueueEventHandler(this); 474 m_CurrentResult = m_Engine.QueueEventHandler(this);
475 else 475 else
476 m_Engine.Log.Error("[Script] Tried to start a script that was already queued"); 476 m_log.Error("[Script] Tried to start a script that was already queued");
477 } 477 }
478 } 478 }
479 } 479 }
@@ -545,7 +545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
545 545
546 public void PostEvent(EventParams data) 546 public void PostEvent(EventParams data)
547 { 547 {
548// m_Engine.Log.DebugFormat("[Script] Posted event {2} in state {3} to {0}.{1}", 548// m_log.DebugFormat("[Script] Posted event {2} in state {3} to {0}.{1}",
549// m_PrimName, m_ScriptName, data.EventName, m_State); 549// m_PrimName, m_ScriptName, data.EventName, m_State);
550 550
551 if (!Running) 551 if (!Running)
@@ -659,7 +659,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
659 659
660 if (data.EventName == "state") // Hardcoded state change 660 if (data.EventName == "state") // Hardcoded state change
661 { 661 {
662 // m_Engine.Log.DebugFormat("[Script] Script {0}.{1} state set to {2}", 662 // m_log.DebugFormat("[Script] Script {0}.{1} state set to {2}",
663 // m_PrimName, m_ScriptName, data.Params[0].ToString()); 663 // m_PrimName, m_ScriptName, data.Params[0].ToString());
664 m_State=data.Params[0].ToString(); 664 m_State=data.Params[0].ToString();
665 AsyncCommandManager.RemoveScript(m_Engine, 665 AsyncCommandManager.RemoveScript(m_Engine,
@@ -680,7 +680,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
680 { 680 {
681 SceneObjectPart part = m_Engine.World.GetSceneObjectPart( 681 SceneObjectPart part = m_Engine.World.GetSceneObjectPart(
682 m_LocalID); 682 m_LocalID);
683 // m_Engine.Log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}", 683 // m_log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}",
684 // m_PrimName, m_ScriptName, data.EventName, m_State); 684 // m_PrimName, m_ScriptName, data.EventName, m_State);
685 685
686 try 686 try
@@ -726,12 +726,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
726 } 726 }
727 catch (Exception e2) // LEGIT: User Scripting 727 catch (Exception e2) // LEGIT: User Scripting
728 { 728 {
729 m_Engine.Log.Error("[Script]: "+ 729 m_log.Error("[Script]: "+
730 "Error displaying error in-world: " + 730 "Error displaying error in-world: " +
731 e2.ToString()); 731 e2.ToString());
732 m_Engine.Log.Error("[Script]: " + 732 m_log.Error("[Script]: " +
733 "Errormessage: Error compiling script:\r\n" + 733 "Errormessage: Error compiling script:\r\n" +
734 e.ToString()); 734 e.ToString());
735 } 735 }
736 } 736 }
737 else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException)) 737 else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException))