From 704e491c3a7a87ed749c7cdf3656baaafc7afdf4 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 5 Jan 2008 16:58:30 +0000 Subject: [PATCH] Added ModuleName to /OpenSim/StartUp modules + debug messages during startup --- .../LoadRegions/LoadRegionsPlugin.cs | 4 ++++ .../RemoteController/RemoteAdminPlugin.cs | 6 ++++++ OpenSim/Region/Application/IApplicationPlugin.cs | 1 + OpenSim/Region/Application/OpenSimMain.cs | 11 ++--------- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 4c1c1d2f55..037a84ac55 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -40,6 +40,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions [Extension("/OpenSim/Startup")] public class LoadRegionsPlugin : IApplicationPlugin { + public string ModuleName() + { + return "OpenSim.ApplicationPlugins.LoadRegions.LoadRegionsPlugin"; + } public void Initialise(OpenSimMain openSim) { MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised"); diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index b57d3e6b66..2f655b36f7 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -50,6 +50,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions private BaseHttpServer m_httpd; private string requiredPassword = ""; + public string ModuleName() + { + return "OpenSim.ApplicationPlugins.LoadRegions.RemoteAdminPlugin"; + } + public void Initialise(OpenSimMain openSim) { try @@ -245,5 +250,6 @@ namespace OpenSim.ApplicationPlugins.LoadRegions public void Close() { } + } } \ No newline at end of file diff --git a/OpenSim/Region/Application/IApplicationPlugin.cs b/OpenSim/Region/Application/IApplicationPlugin.cs index 4f81354a06..45b0cd0acd 100644 --- a/OpenSim/Region/Application/IApplicationPlugin.cs +++ b/OpenSim/Region/Application/IApplicationPlugin.cs @@ -37,5 +37,6 @@ namespace OpenSim { void Initialise(OpenSimMain openSim); void Close(); + string ModuleName(); } } \ No newline at end of file diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index f41ec2125e..9f6d934405 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -294,14 +294,12 @@ namespace OpenSim m_log = CreateLog(); MainLog.Instance = m_log; - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #1"); // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp // TerrainManager, StorageManager, HTTP Server // This base will call abstract Initialize base.StartUp(); - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #2"); // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) if (m_sandbox) { @@ -340,26 +338,21 @@ namespace OpenSim m_httpServer.AddStreamHandler(new SimStatusHandler()); } - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #3"); // Create a ModuleLoader instance m_moduleLoader = new ModuleLoader(m_log, m_config); - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #4"); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); MainLog.Instance.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count); - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #5"); - int ctedd = 0; + int modcount = 0; foreach (TypeExtensionNode node in nodes) { IApplicationPlugin plugin = (IApplicationPlugin)node.CreateInstance(); - MainLog.Instance.Debug("PLUGINS", "Loading OpenSim application plugin: ", plugin.GetType().AssemblyQualifiedName.ToString()); + MainLog.Instance.Debug("PLUGINS", "Loading OpenSim application plugin(" + modcount + "): ", plugin.ModuleName()); plugin.Initialise(this); m_plugins.Add(plugin); - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #6: " + ++ctedd); } - MainLog.Instance.Verbose("STARTUP", "TEDD DEBUG #7"); // Start UDP servers //for (int i = 0; i < m_udpServers.Count; i++)