From 45d1e6ab09309e21f96979548b5d1b4904800f65 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Nov 2012 04:45:53 +0000 Subject: Make "show info" command available across all servers This helpfully lists version information, startup location and console log level --- OpenSim/Server/Base/ServicesServerBase.cs | 43 +------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'OpenSim/Server') 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 XmlConfigurator.Configure(); } - ILoggerRepository repository = LogManager.GetRepository(); - IAppender[] appenders = repository.GetAppenders(); - - foreach (IAppender appender in appenders) - { - if (appender.Name == "Console") - { - consoleAppender = (OpenSimAppender)appender; - } - if (appender.Name == "LogFileAppender") - { - fileAppender = (FileAppender)appender; - } - } - - if (consoleAppender == null) - { - System.Console.WriteLine("No console appender found. Server can't start"); - Thread.CurrentThread.Abort(); - } - else - { - consoleAppender.Console = (ConsoleBase)MainConsole.Instance; - - if (null == consoleAppender.Threshold) - consoleAppender.Threshold = Level.All; - } - - // Set log file - // - if (fileAppender != null) - { - if (startupConfig != null) - { - string cfgFileName = startupConfig.GetString("logfile", null); - if (cfgFileName != null) - { - fileAppender.File = cfgFileName; - fileAppender.ActivateOptions(); - } - } - } + RegisterCommonAppenders(startupConfig); if (startupConfig.GetString("PIDFile", String.Empty) != String.Empty) { -- cgit v1.1