* Move log version printing up into BaseOpenSimServer

0.6.0-stable
Justin Clarke Casey 2008-06-01 01:22:19 +00:00
parent 8e1d338656
commit 45fef8589d
5 changed files with 23 additions and 19 deletions

View File

@ -27,6 +27,8 @@
using System; using System;
using System.IO; using System.IO;
using System.Reflection;
using log4net;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Statistics; using OpenSim.Framework.Statistics;
@ -37,6 +39,8 @@ namespace OpenSim.Framework.Servers
/// </summary> /// </summary>
public abstract class BaseOpenSimServer public abstract class BaseOpenSimServer
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected ConsoleBase m_console; protected ConsoleBase m_console;
/// <summary> /// <summary>
@ -63,11 +67,17 @@ namespace OpenSim.Framework.Servers
public BaseOpenSimServer() public BaseOpenSimServer()
{ {
m_startuptime = DateTime.Now; m_startuptime = DateTime.Now;
m_version = VersionInfo.Version; m_version = VersionInfo.Version;
}
// FIXME: This should probably occur in a startup method common for all the servers. /// <summary>
/// Performs initialisation of the scene, such as loading configuration from disk.
/// </summary>
public virtual void StartUp()
{
EnhanceVersionInformation(); EnhanceVersionInformation();
m_log.Info("[STARTUP]: Version " + m_version + "\n");
} }
/// <summary> /// <summary>

View File

@ -82,10 +82,6 @@ namespace OpenSim
/// </summary> /// </summary>
public override void StartUp() public override void StartUp()
{ {
//
// Called from app startup (OpenSim.Application)
//
m_log.Info("===================================================================="); m_log.Info("====================================================================");
m_log.Info("========================= STARTING OPENSIM ========================="); m_log.Info("========================= STARTING OPENSIM =========================");
m_log.Info("===================================================================="); m_log.Info("====================================================================");
@ -93,7 +89,8 @@ namespace OpenSim
m_console = CreateConsole(); m_console = CreateConsole();
MainConsole.Instance = m_console; MainConsole.Instance = m_console;
InternalStartUp();
base.StartUp();
//Run Startup Commands //Run Startup Commands
if (m_startupCommandsFile != String.Empty) if (m_startupCommandsFile != String.Empty)

View File

@ -58,7 +58,7 @@ namespace OpenSim
m_log.Info("===================================================================="); m_log.Info("====================================================================");
m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid");
InternalStartUp(); base.StartUp();
// We are done with startup // We are done with startup
m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",

View File

@ -330,17 +330,12 @@ namespace OpenSim
/// <summary> /// <summary>
/// Performs initialisation of the scene, such as loading configuration from disk. /// Performs initialisation of the scene, such as loading configuration from disk.
/// </summary> /// </summary>
protected void InternalStartUp() public override void StartUp()
{ {
m_log.Info("[STARTUP]: Version " + m_version + "\n"); base.StartUp();
m_stats = StatsManager.StartCollectingSimExtraStats(); 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();
// StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false)
if (m_sandbox) if (m_sandbox)
{ {

View File

@ -73,8 +73,10 @@ namespace OpenSim.Region.ClientStack
get { return m_sceneManager; } get { return m_sceneManager; }
} }
public virtual void StartUp() public override void StartUp()
{ {
base.StartUp();
LLClientView.TerrainManager = new TerrainManager(new SecondLife()); LLClientView.TerrainManager = new TerrainManager(new SecondLife());
m_storageManager = CreateStorageManager(m_storageConnectionString); m_storageManager = CreateStorageManager(m_storageConnectionString);