diff options
author | Mike Mazur | 2009-02-16 02:27:43 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-16 02:27:43 +0000 |
commit | 5277fc64c07da92014e749be40aa837193a26495 (patch) | |
tree | 5351a96ac5d612560dc63d8c8585237d9dc80d27 /OpenSim/Grid/AssetInventoryServer/Main.cs | |
parent | - remove dependency on ExtensionLoader.dll (DBConnString.cs can go) (diff) | |
download | opensim-SC_OLD-5277fc64c07da92014e749be40aa837193a26495.zip opensim-SC_OLD-5277fc64c07da92014e749be40aa837193a26495.tar.gz opensim-SC_OLD-5277fc64c07da92014e749be40aa837193a26495.tar.bz2 opensim-SC_OLD-5277fc64c07da92014e749be40aa837193a26495.tar.xz |
- change AssetInventoryServer config from XML to INI
- convert AssetInventoryServer logging to OpenSim's log4net
- updated AssetInventoryServer.ini.example file
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Main.cs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Main.cs b/OpenSim/Grid/AssetInventoryServer/Main.cs index 2f01281..8f7d706 100644 --- a/OpenSim/Grid/AssetInventoryServer/Main.cs +++ b/OpenSim/Grid/AssetInventoryServer/Main.cs | |||
@@ -28,7 +28,8 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | using System; | 30 | using System; |
31 | using System.ServiceProcess; | 31 | using Nini.Config; |
32 | using log4net.Config; | ||
32 | 33 | ||
33 | namespace OpenSim.Grid.AssetInventoryServer | 34 | namespace OpenSim.Grid.AssetInventoryServer |
34 | { | 35 | { |
@@ -36,28 +37,24 @@ namespace OpenSim.Grid.AssetInventoryServer | |||
36 | { | 37 | { |
37 | static void Main(string[] args) | 38 | static void Main(string[] args) |
38 | { | 39 | { |
39 | #if DEBUG | 40 | XmlConfigurator.Configure(); |
40 | AssetInventoryServer server = new AssetInventoryServer(); | 41 | |
42 | ArgvConfigSource configSource = new ArgvConfigSource(args); | ||
43 | configSource.AddSwitch("Startup", "inifile"); | ||
44 | |||
45 | AssetInventoryServer server = new AssetInventoryServer(configSource); | ||
41 | if (server.Start()) | 46 | if (server.Start()) |
42 | { | 47 | { |
43 | Console.WriteLine("Asset server is running. Press CTRL+C to quit"); | ||
44 | |||
45 | Console.CancelKeyPress += | 48 | Console.CancelKeyPress += |
46 | delegate(object sender, ConsoleCancelEventArgs e) | 49 | delegate(object sender, ConsoleCancelEventArgs e) |
47 | { | 50 | { |
48 | Console.WriteLine("Asset server is shutting down..."); | 51 | Console.WriteLine("AssetInventory server is shutting down..."); |
49 | server.Shutdown(); | 52 | server.Shutdown(); |
50 | Environment.Exit(0); | 53 | Environment.Exit(0); |
51 | }; | 54 | }; |
52 | 55 | ||
53 | server.Work(); | 56 | server.Work(); |
54 | //while (true) | ||
55 | // Console.ReadLine(); | ||
56 | } | 57 | } |
57 | #else | ||
58 | ServiceBase[] servicesToRun = new ServiceBase[] { new AssetInventoryServer() }; | ||
59 | ServiceBase.Run(servicesToRun); | ||
60 | #endif | ||
61 | } | 58 | } |
62 | } | 59 | } |
63 | } | 60 | } |