From 45fef8589d430fac076e534fdf5635ad4de4cb31 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sun, 1 Jun 2008 01:22:19 +0000 Subject: * Move log version printing up into BaseOpenSimServer --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 18 ++++++++++++++---- OpenSim/Region/Application/OpenSim.cs | 7 ++----- OpenSim/Region/Application/OpenSimBackground.cs | 2 +- OpenSim/Region/Application/OpenSimBase.cs | 11 +++-------- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 4 +++- 5 files changed, 23 insertions(+), 19 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 0205e38..c2633f8 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -27,6 +27,8 @@ using System; using System.IO; +using System.Reflection; +using log4net; using OpenSim.Framework.Console; using OpenSim.Framework.Statistics; @@ -37,6 +39,8 @@ namespace OpenSim.Framework.Servers /// public abstract class BaseOpenSimServer { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected ConsoleBase m_console; /// @@ -62,12 +66,18 @@ namespace OpenSim.Framework.Servers public BaseOpenSimServer() { - m_startuptime = DateTime.Now; - + m_startuptime = DateTime.Now; m_version = VersionInfo.Version; - - // FIXME: This should probably occur in a startup method common for all the servers. + } + + /// + /// Performs initialisation of the scene, such as loading configuration from disk. + /// + public virtual void StartUp() + { EnhanceVersionInformation(); + + m_log.Info("[STARTUP]: Version " + m_version + "\n"); } /// diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 1bed036..1996182 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -82,10 +82,6 @@ namespace OpenSim /// public override void StartUp() { - // - // Called from app startup (OpenSim.Application) - // - m_log.Info("===================================================================="); m_log.Info("========================= STARTING OPENSIM ========================="); m_log.Info("===================================================================="); @@ -93,7 +89,8 @@ namespace OpenSim m_console = CreateConsole(); MainConsole.Instance = m_console; - InternalStartUp(); + + base.StartUp(); //Run Startup Commands if (m_startupCommandsFile != String.Empty) diff --git a/OpenSim/Region/Application/OpenSimBackground.cs b/OpenSim/Region/Application/OpenSimBackground.cs index 0c3a0a3..dd618f0 100644 --- a/OpenSim/Region/Application/OpenSimBackground.cs +++ b/OpenSim/Region/Application/OpenSimBackground.cs @@ -58,7 +58,7 @@ namespace OpenSim m_log.Info("===================================================================="); m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); - InternalStartUp(); + base.StartUp(); // We are done with startup m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 468881e..3e4db41 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -330,16 +330,11 @@ namespace OpenSim /// /// Performs initialisation of the scene, such as loading configuration from disk. /// - protected void InternalStartUp() + public override void StartUp() { - m_log.Info("[STARTUP]: Version " + m_version + "\n"); - - m_stats = StatsManager.StartCollectingSimExtraStats(); - - // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp - // TerrainManager, StorageManager, HTTP Server - // This base will call abstract Initialize base.StartUp(); + + m_stats = StatsManager.StartCollectingSimExtraStats(); // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) if (m_sandbox) diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 586384f..19d14ad 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -73,8 +73,10 @@ namespace OpenSim.Region.ClientStack get { return m_sceneManager; } } - public virtual void StartUp() + public override void StartUp() { + base.StartUp(); + LLClientView.TerrainManager = new TerrainManager(new SecondLife()); m_storageManager = CreateStorageManager(m_storageConnectionString); -- cgit v1.1