aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-11-22 04:45:53 +0000
committerJustin Clark-Casey (justincc)2012-11-22 04:45:53 +0000
commit45d1e6ab09309e21f96979548b5d1b4904800f65 (patch)
tree7100fb7c02636a06e9c7de8d0c644de5f118c5e1 /OpenSim/Server/Base
parentFactor out common registration of "show uptime" command (diff)
downloadopensim-SC_OLD-45d1e6ab09309e21f96979548b5d1b4904800f65.zip
opensim-SC_OLD-45d1e6ab09309e21f96979548b5d1b4904800f65.tar.gz
opensim-SC_OLD-45d1e6ab09309e21f96979548b5d1b4904800f65.tar.bz2
opensim-SC_OLD-45d1e6ab09309e21f96979548b5d1b4904800f65.tar.xz
Make "show info" command available across all servers
This helpfully lists version information, startup location and console log level
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs43
1 files changed, 1 insertions, 42 deletions
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index 285168c..15586f8 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -191,48 +191,7 @@ namespace OpenSim.Server.Base
191 XmlConfigurator.Configure(); 191 XmlConfigurator.Configure();
192 } 192 }
193 193
194 ILoggerRepository repository = LogManager.GetRepository(); 194 RegisterCommonAppenders(startupConfig);
195 IAppender[] appenders = repository.GetAppenders();
196
197 foreach (IAppender appender in appenders)
198 {
199 if (appender.Name == "Console")
200 {
201 consoleAppender = (OpenSimAppender)appender;
202 }
203 if (appender.Name == "LogFileAppender")
204 {
205 fileAppender = (FileAppender)appender;
206 }
207 }
208
209 if (consoleAppender == null)
210 {
211 System.Console.WriteLine("No console appender found. Server can't start");
212 Thread.CurrentThread.Abort();
213 }
214 else
215 {
216 consoleAppender.Console = (ConsoleBase)MainConsole.Instance;
217
218 if (null == consoleAppender.Threshold)
219 consoleAppender.Threshold = Level.All;
220 }
221
222 // Set log file
223 //
224 if (fileAppender != null)
225 {
226 if (startupConfig != null)
227 {
228 string cfgFileName = startupConfig.GetString("logfile", null);
229 if (cfgFileName != null)
230 {
231 fileAppender.File = cfgFileName;
232 fileAppender.ActivateOptions();
233 }
234 }
235 }
236 195
237 if (startupConfig.GetString("PIDFile", String.Empty) != String.Empty) 196 if (startupConfig.GetString("PIDFile", String.Empty) != String.Empty)
238 { 197 {