diff options
Diffstat (limited to 'OpenSim/Region/Application/ConfigurationLoader.cs')
-rw-r--r-- | OpenSim/Region/Application/ConfigurationLoader.cs | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 655c5ca..4ca6595 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class ConfigurationLoader | 43 | public class ConfigurationLoader |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | /// <summary> | 47 | /// <summary> |
46 | /// Various Config settings the region needs to start | 48 | /// Various Config settings the region needs to start |
47 | /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, | 49 | /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, |
@@ -61,17 +63,6 @@ namespace OpenSim | |||
61 | protected NetworkServersInfo m_networkServersInfo; | 63 | protected NetworkServersInfo m_networkServersInfo; |
62 | 64 | ||
63 | /// <summary> | 65 | /// <summary> |
64 | /// Console logger | ||
65 | /// </summary> | ||
66 | private static readonly ILog m_log = | ||
67 | LogManager.GetLogger( | ||
68 | MethodBase.GetCurrentMethod().DeclaringType); | ||
69 | |||
70 | public ConfigurationLoader() | ||
71 | { | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// Loads the region configuration | 66 | /// Loads the region configuration |
76 | /// </summary> | 67 | /// </summary> |
77 | /// <param name="argvSource">Parameters passed into the process when started</param> | 68 | /// <param name="argvSource">Parameters passed into the process when started</param> |
@@ -164,12 +155,12 @@ namespace OpenSim | |||
164 | m_config.Source = new IniConfigSource(); | 155 | m_config.Source = new IniConfigSource(); |
165 | m_config.Source.Merge(DefaultConfig()); | 156 | m_config.Source.Merge(DefaultConfig()); |
166 | 157 | ||
167 | m_log.Info("[CONFIG] Reading configuration settings"); | 158 | m_log.Info("[CONFIG]: Reading configuration settings"); |
168 | 159 | ||
169 | if (sources.Count == 0) | 160 | if (sources.Count == 0) |
170 | { | 161 | { |
171 | m_log.FatalFormat("[CONFIG] Could not load any configuration"); | 162 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
172 | m_log.FatalFormat("[CONFIG] Did you copy the OpenSim.ini.example file to OpenSim.ini?"); | 163 | m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?"); |
173 | Environment.Exit(1); | 164 | Environment.Exit(1); |
174 | } | 165 | } |
175 | 166 | ||
@@ -182,13 +173,12 @@ namespace OpenSim | |||
182 | 173 | ||
183 | if (!iniFileExists) | 174 | if (!iniFileExists) |
184 | { | 175 | { |
185 | m_log.FatalFormat("[CONFIG] Could not load any configuration"); | 176 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
186 | m_log.FatalFormat("[CONFIG] Configuration exists, but there was an error loading it!"); | 177 | m_log.FatalFormat("[CONFIG]: Configuration exists, but there was an error loading it!"); |
187 | Environment.Exit(1); | 178 | Environment.Exit(1); |
188 | } | 179 | } |
189 | 180 | ||
190 | // Make sure command line options take precedence | 181 | // Make sure command line options take precedence |
191 | // | ||
192 | m_config.Source.Merge(argvSource); | 182 | m_config.Source.Merge(argvSource); |
193 | 183 | ||
194 | ReadConfigSettings(); | 184 | ReadConfigSettings(); |
@@ -257,20 +247,17 @@ namespace OpenSim | |||
257 | 247 | ||
258 | if (!IsUri(iniPath)) | 248 | if (!IsUri(iniPath)) |
259 | { | 249 | { |
260 | m_log.InfoFormat("[CONFIG] Reading configuration file {0}", | 250 | m_log.InfoFormat("[CONFIG]: Reading configuration file {0}", Path.GetFullPath(iniPath)); |
261 | Path.GetFullPath(iniPath)); | ||
262 | 251 | ||
263 | m_config.Source.Merge(new IniConfigSource(iniPath)); | 252 | m_config.Source.Merge(new IniConfigSource(iniPath)); |
264 | success = true; | 253 | success = true; |
265 | } | 254 | } |
266 | else | 255 | else |
267 | { | 256 | { |
268 | m_log.InfoFormat("[CONFIG] {0} is a http:// URI, fetching ...", | 257 | m_log.InfoFormat("[CONFIG]: {0} is a http:// URI, fetching ...", iniPath); |
269 | iniPath); | ||
270 | 258 | ||
271 | // The ini file path is a http URI | 259 | // The ini file path is a http URI |
272 | // Try to read it | 260 | // Try to read it |
273 | // | ||
274 | try | 261 | try |
275 | { | 262 | { |
276 | XmlReader r = XmlReader.Create(iniPath); | 263 | XmlReader r = XmlReader.Create(iniPath); |
@@ -281,7 +268,7 @@ namespace OpenSim | |||
281 | } | 268 | } |
282 | catch (Exception e) | 269 | catch (Exception e) |
283 | { | 270 | { |
284 | m_log.FatalFormat("[CONFIG] Exception reading config from URI {0}\n" + e.ToString(), iniPath); | 271 | m_log.FatalFormat("[CONFIG]: Exception reading config from URI {0}\n" + e.ToString(), iniPath); |
285 | Environment.Exit(1); | 272 | Environment.Exit(1); |
286 | } | 273 | } |
287 | } | 274 | } |