diff options
author | Justin Clarke Casey | 2008-06-01 01:22:19 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-01 01:22:19 +0000 |
commit | 45fef8589d430fac076e534fdf5635ad4de4cb31 (patch) | |
tree | af0efd8a4bf1102823a624d92b4732cc32919db3 | |
parent | * Refactor: Split opensim background server into a separate class (diff) | |
download | opensim-SC_OLD-45fef8589d430fac076e534fdf5635ad4de4cb31.zip opensim-SC_OLD-45fef8589d430fac076e534fdf5635ad4de4cb31.tar.gz opensim-SC_OLD-45fef8589d430fac076e534fdf5635ad4de4cb31.tar.bz2 opensim-SC_OLD-45fef8589d430fac076e534fdf5635ad4de4cb31.tar.xz |
* Move log version printing up into BaseOpenSimServer
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBackground.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 4 |
5 files changed, 23 insertions, 19 deletions
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 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Reflection; | ||
31 | using log4net; | ||
30 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
31 | using OpenSim.Framework.Statistics; | 33 | using OpenSim.Framework.Statistics; |
32 | 34 | ||
@@ -37,6 +39,8 @@ namespace OpenSim.Framework.Servers | |||
37 | /// </summary> | 39 | /// </summary> |
38 | public abstract class BaseOpenSimServer | 40 | public abstract class BaseOpenSimServer |
39 | { | 41 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
40 | protected ConsoleBase m_console; | 44 | protected ConsoleBase m_console; |
41 | 45 | ||
42 | /// <summary> | 46 | /// <summary> |
@@ -62,12 +66,18 @@ namespace OpenSim.Framework.Servers | |||
62 | 66 | ||
63 | public BaseOpenSimServer() | 67 | public BaseOpenSimServer() |
64 | { | 68 | { |
65 | m_startuptime = DateTime.Now; | 69 | m_startuptime = DateTime.Now; |
66 | |||
67 | m_version = VersionInfo.Version; | 70 | m_version = VersionInfo.Version; |
68 | 71 | } | |
69 | // FIXME: This should probably occur in a startup method common for all the servers. | 72 | |
73 | /// <summary> | ||
74 | /// Performs initialisation of the scene, such as loading configuration from disk. | ||
75 | /// </summary> | ||
76 | public virtual void StartUp() | ||
77 | { | ||
70 | EnhanceVersionInformation(); | 78 | EnhanceVersionInformation(); |
79 | |||
80 | m_log.Info("[STARTUP]: Version " + m_version + "\n"); | ||
71 | } | 81 | } |
72 | 82 | ||
73 | /// <summary> | 83 | /// <summary> |
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 | |||
82 | /// </summary> | 82 | /// </summary> |
83 | public override void StartUp() | 83 | public override void StartUp() |
84 | { | 84 | { |
85 | // | ||
86 | // Called from app startup (OpenSim.Application) | ||
87 | // | ||
88 | |||
89 | m_log.Info("===================================================================="); | 85 | m_log.Info("===================================================================="); |
90 | m_log.Info("========================= STARTING OPENSIM ========================="); | 86 | m_log.Info("========================= STARTING OPENSIM ========================="); |
91 | m_log.Info("===================================================================="); | 87 | m_log.Info("===================================================================="); |
@@ -93,7 +89,8 @@ namespace OpenSim | |||
93 | 89 | ||
94 | m_console = CreateConsole(); | 90 | m_console = CreateConsole(); |
95 | MainConsole.Instance = m_console; | 91 | MainConsole.Instance = m_console; |
96 | InternalStartUp(); | 92 | |
93 | base.StartUp(); | ||
97 | 94 | ||
98 | //Run Startup Commands | 95 | //Run Startup Commands |
99 | if (m_startupCommandsFile != String.Empty) | 96 | 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 | |||
58 | m_log.Info("===================================================================="); | 58 | m_log.Info("===================================================================="); |
59 | m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); | 59 | m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); |
60 | 60 | ||
61 | InternalStartUp(); | 61 | base.StartUp(); |
62 | 62 | ||
63 | // We are done with startup | 63 | // We are done with startup |
64 | m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", | 64 | 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 | |||
330 | /// <summary> | 330 | /// <summary> |
331 | /// Performs initialisation of the scene, such as loading configuration from disk. | 331 | /// Performs initialisation of the scene, such as loading configuration from disk. |
332 | /// </summary> | 332 | /// </summary> |
333 | protected void InternalStartUp() | 333 | public override void StartUp() |
334 | { | 334 | { |
335 | m_log.Info("[STARTUP]: Version " + m_version + "\n"); | ||
336 | |||
337 | m_stats = StatsManager.StartCollectingSimExtraStats(); | ||
338 | |||
339 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp | ||
340 | // TerrainManager, StorageManager, HTTP Server | ||
341 | // This base will call abstract Initialize | ||
342 | base.StartUp(); | 335 | base.StartUp(); |
336 | |||
337 | m_stats = StatsManager.StartCollectingSimExtraStats(); | ||
343 | 338 | ||
344 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) | 339 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) |
345 | if (m_sandbox) | 340 | 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 | |||
73 | get { return m_sceneManager; } | 73 | get { return m_sceneManager; } |
74 | } | 74 | } |
75 | 75 | ||
76 | public virtual void StartUp() | 76 | public override void StartUp() |
77 | { | 77 | { |
78 | base.StartUp(); | ||
79 | |||
78 | LLClientView.TerrainManager = new TerrainManager(new SecondLife()); | 80 | LLClientView.TerrainManager = new TerrainManager(new SecondLife()); |
79 | 81 | ||
80 | m_storageManager = CreateStorageManager(m_storageConnectionString); | 82 | m_storageManager = CreateStorageManager(m_storageConnectionString); |