diff options
author | Dr Scofield | 2009-04-03 12:47:56 +0000 |
---|---|---|
committer | Dr Scofield | 2009-04-03 12:47:56 +0000 |
commit | fc1b1bc797c851cdc10f1db6708a7c22db546f46 (patch) | |
tree | 48fb1d286a1c5b7bc4e4d2b52f13f35631ec4e78 /OpenSim/Region/Application | |
parent | * Implements MRM IObject.Say - this is equivilent to llSay (diff) | |
download | opensim-SC-fc1b1bc797c851cdc10f1db6708a7c22db546f46.zip opensim-SC-fc1b1bc797c851cdc10f1db6708a7c22db546f46.tar.gz opensim-SC-fc1b1bc797c851cdc10f1db6708a7c22db546f46.tar.bz2 opensim-SC-fc1b1bc797c851cdc10f1db6708a7c22db546f46.tar.xz |
- adding -logconfig option to allow configuration of log4net from
log4net config file other then bin/OpenSim.exe.config
- moving ArgvConfigSource initialization up to allow for configuration
of XmlConfigurator.Configure()
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 32033cc..7244dc9 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -54,7 +54,20 @@ namespace OpenSim | |||
54 | AppDomain.CurrentDomain.UnhandledException += | 54 | AppDomain.CurrentDomain.UnhandledException += |
55 | new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); | 55 | new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
56 | 56 | ||
57 | XmlConfigurator.Configure(); | 57 | ArgvConfigSource configSource = new ArgvConfigSource(args); |
58 | configSource.AddSwitch("Startup", "logconfig"); | ||
59 | string logConfigFile = configSource.Configs["Startup"].GetString("logconfig", String.Empty); | ||
60 | if (logConfigFile != String.Empty) | ||
61 | { | ||
62 | XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile)); | ||
63 | m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file", | ||
64 | logConfigFile); | ||
65 | } | ||
66 | else | ||
67 | { | ||
68 | XmlConfigurator.Configure(); | ||
69 | m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config"); | ||
70 | } | ||
58 | 71 | ||
59 | m_log.Info("Performing compatibility checks... "); | 72 | m_log.Info("Performing compatibility checks... "); |
60 | string supported = String.Empty; | 73 | string supported = String.Empty; |
@@ -69,7 +82,6 @@ namespace OpenSim | |||
69 | 82 | ||
70 | Culture.SetCurrentCulture(); | 83 | Culture.SetCurrentCulture(); |
71 | 84 | ||
72 | ArgvConfigSource configSource = new ArgvConfigSource(args); | ||
73 | 85 | ||
74 | configSource.Alias.AddAlias("On", true); | 86 | configSource.Alias.AddAlias("On", true); |
75 | configSource.Alias.AddAlias("Off", false); | 87 | configSource.Alias.AddAlias("Off", false); |