diff options
author | Justin Clark-Casey (justincc) | 2013-01-23 23:34:15 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-23 23:34:15 +0000 |
commit | 72dd3633eeb74c64620ffedb1618e732cbbca641 (patch) | |
tree | 4c2c544bdbc31b57003a60ed4a2b1beeaa320db8 /OpenSim/Region/ScriptEngine/XEngine | |
parent | If ScriptStopStrategy hasn't been set to co-op in [XEngine] config, then cont... (diff) | |
download | opensim-SC_OLD-72dd3633eeb74c64620ffedb1618e732cbbca641.zip opensim-SC_OLD-72dd3633eeb74c64620ffedb1618e732cbbca641.tar.gz opensim-SC_OLD-72dd3633eeb74c64620ffedb1618e732cbbca641.tar.bz2 opensim-SC_OLD-72dd3633eeb74c64620ffedb1618e732cbbca641.tar.xz |
Improve logging by making it clearer which script is failing if an assembly fails to load.
Moves the noise co-op start/stop debug log messages to only display if xengine debug level >= 1
Logs which stop strategy is being used (abort or co-op)
Adjusts some other logging to remove not very useful stuff
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 9405075..afde685 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
52 | { | 52 | { |
53 | myScriptEngine = _ScriptEngine; | 53 | myScriptEngine = _ScriptEngine; |
54 | 54 | ||
55 | m_log.Info("[XEngine] Hooking up to server events"); | 55 | // m_log.Info("[XEngine] Hooking up to server events"); |
56 | myScriptEngine.World.EventManager.OnAttach += attach; | 56 | myScriptEngine.World.EventManager.OnAttach += attach; |
57 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 57 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
58 | myScriptEngine.World.EventManager.OnObjectGrabbing += touch; | 58 | myScriptEngine.World.EventManager.OnObjectGrabbing += touch; |
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
69 | myScriptEngine.World.EventManager.OnScriptLandColliderStart += land_collision_start; | 69 | myScriptEngine.World.EventManager.OnScriptLandColliderStart += land_collision_start; |
70 | myScriptEngine.World.EventManager.OnScriptLandColliding += land_collision; | 70 | myScriptEngine.World.EventManager.OnScriptLandColliding += land_collision; |
71 | myScriptEngine.World.EventManager.OnScriptLandColliderEnd += land_collision_end; | 71 | myScriptEngine.World.EventManager.OnScriptLandColliderEnd += land_collision_end; |
72 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); | 72 | IMoneyModule money = myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); |
73 | if (money != null) | 73 | if (money != null) |
74 | { | 74 | { |
75 | money.OnObjectPaid+=HandleObjectPaid; | 75 | money.OnObjectPaid+=HandleObjectPaid; |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 604924b..ad79a9b 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -241,7 +241,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
241 | m_ScriptConfig = configSource.Configs["XEngine"]; | 241 | m_ScriptConfig = configSource.Configs["XEngine"]; |
242 | m_ConfigSource = configSource; | 242 | m_ConfigSource = configSource; |
243 | 243 | ||
244 | if (m_ScriptConfig.GetString("ScriptStopStrategy", "abort") == "co-op") | 244 | string rawScriptStopStrategy = m_ScriptConfig.GetString("ScriptStopStrategy", "abort"); |
245 | |||
246 | m_log.InfoFormat("[XEngine]: Script stop strategy is {0}", rawScriptStopStrategy); | ||
247 | |||
248 | if (rawScriptStopStrategy == "co-op") | ||
245 | { | 249 | { |
246 | ScriptClassName = "XEngineScript"; | 250 | ScriptClassName = "XEngineScript"; |
247 | ScriptBaseClassName = typeof(XEngineScriptBase).FullName; | 251 | ScriptBaseClassName = typeof(XEngineScriptBase).FullName; |
@@ -261,15 +265,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
261 | { | 265 | { |
262 | if (m_ScriptConfig == null) | 266 | if (m_ScriptConfig == null) |
263 | return; | 267 | return; |
268 | |||
264 | m_ScriptFailCount = 0; | 269 | m_ScriptFailCount = 0; |
265 | m_ScriptErrorMessage = String.Empty; | 270 | m_ScriptErrorMessage = String.Empty; |
266 | 271 | ||
267 | if (m_ScriptConfig == null) | ||
268 | { | ||
269 | // m_log.ErrorFormat("[XEngine] No script configuration found. Scripts disabled"); | ||
270 | return; | ||
271 | } | ||
272 | |||
273 | m_Enabled = m_ScriptConfig.GetBoolean("Enabled", true); | 272 | m_Enabled = m_ScriptConfig.GetBoolean("Enabled", true); |
274 | 273 | ||
275 | if (!m_Enabled) | 274 | if (!m_Enabled) |