From d4cd9e050bfbc46df4c3a3b490d488df69a57ce8 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 22 Jun 2012 02:10:27 +0100 Subject: [PATCH] If starting scripts on initial sim start, provide INFO level log feedback each time 50 scripts have been started. This is to provide an indication of what's happening now that the default isn't to report every single script start. Changes XEngine logging level in OpenSim.exe.config from WARN to INFO. --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 2 +- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 16 ++++++++++------ bin/OpenSim.exe.config | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 62ea9e3cc5..9459f76a5e 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -321,7 +321,7 @@ namespace OpenSim.Framework.Servers TimeSpan timeTaken = DateTime.Now - m_startuptime; m_log.InfoFormat( - "[STARTUP]: Non-script portion of startup took {0}m {1}s. PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS.", + "[STARTUP]: Non-script portion of startup took {0}m {1}s. PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS ONCE SCRIPTS HAVE STARTED.", timeTaken.Minutes, timeTaken.Seconds); } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e163c6ca49..d52e2941fe 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -853,7 +853,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine { if (m_InitialStartup) { - m_InitialStartup = false; + // This delay exists to stop mono problems where script compilation and startup would stop the sim + // working properly for the session. System.Threading.Thread.Sleep(15000); } @@ -867,14 +868,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine { scriptsStarted++; -// if (scriptsStarted % 50 == 0) -// m_log.DebugFormat( -// "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); + if (m_InitialStartup) + if (scriptsStarted % 50 == 0) + m_log.InfoFormat( + "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); } } -// m_log.DebugFormat( -// "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); + if (m_InitialStartup) + m_log.InfoFormat( + "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); // NOTE: Despite having a lockless queue, this lock is required // to make sure there is never no compile thread while there @@ -888,6 +891,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_ScriptErrorMessage); m_ScriptFailCount = 0; + m_InitialStartup = false; return null; } diff --git a/bin/OpenSim.exe.config b/bin/OpenSim.exe.config index f1e3709688..e3107abc87 100755 --- a/bin/OpenSim.exe.config +++ b/bin/OpenSim.exe.config @@ -33,7 +33,7 @@ - +