diff options
author | Justin Clarke Casey | 2008-01-25 19:24:25 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-25 19:24:25 +0000 |
commit | 90c853685c14e186a3dfd06b7a584d16bf520ccf (patch) | |
tree | c55acd1c4577b257da0cb73f9b092e1ac79912e7 /OpenSim/Grid/AssetServer/Main.cs | |
parent | Implemented a suggestion from Mic Bowman regarding border crossing and Signif... (diff) | |
download | opensim-SC_OLD-90c853685c14e186a3dfd06b7a584d16bf520ccf.zip opensim-SC_OLD-90c853685c14e186a3dfd06b7a584d16bf520ccf.tar.gz opensim-SC_OLD-90c853685c14e186a3dfd06b7a584d16bf520ccf.tar.bz2 opensim-SC_OLD-90c853685c14e186a3dfd06b7a584d16bf520ccf.tar.xz |
* Add very basic initial login stats to the user server
* Typing 'stats' on the command line will given total number of successful logins today and yesterday
* A little bit more to come, probably
* Refactoring will follow next
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 4fc66f7..1e0dced 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Grid.AssetServer | |||
53 | 53 | ||
54 | private IAssetProvider m_assetProvider; | 54 | private IAssetProvider m_assetProvider; |
55 | 55 | ||
56 | private AssetStatsReporter stats; | 56 | protected AssetStatsReporter m_stats; |
57 | 57 | ||
58 | [STAThread] | 58 | [STAThread] |
59 | public static void Main(string[] args) | 59 | public static void Main(string[] args) |
@@ -100,10 +100,9 @@ namespace OpenSim.Grid.AssetServer | |||
100 | m_console.Verbose("ASSET", "Starting HTTP process"); | 100 | m_console.Verbose("ASSET", "Starting HTTP process"); |
101 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); | 101 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); |
102 | 102 | ||
103 | // XXX Hardcoded - could be a plugin later on | 103 | m_stats = new AssetStatsReporter(); |
104 | stats = new AssetStatsReporter(); | ||
105 | 104 | ||
106 | httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, stats)); | 105 | httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, m_stats)); |
107 | httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); | 106 | httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); |
108 | 107 | ||
109 | httpServer.Start(); | 108 | httpServer.Start(); |
@@ -179,12 +178,12 @@ namespace OpenSim.Grid.AssetServer | |||
179 | case "help": | 178 | case "help": |
180 | m_console.Notice( | 179 | m_console.Notice( |
181 | @"shutdown - shutdown this asset server (USE CAUTION!) | 180 | @"shutdown - shutdown this asset server (USE CAUTION!) |
182 | stats - statistical information for this asset server"); | 181 | stats - statistical information for this server"); |
183 | 182 | ||
184 | break; | 183 | break; |
185 | 184 | ||
186 | case "stats": | 185 | case "stats": |
187 | MainLog.Instance.Notice("STATS", Environment.NewLine + stats.Report()); | 186 | MainLog.Instance.Notice("STATS", Environment.NewLine + m_stats.Report()); |
188 | break; | 187 | break; |
189 | 188 | ||
190 | case "shutdown": | 189 | case "shutdown": |