From 5c48d7a378ff066f59b9cee02f2803ebe1616481 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Nov 2012 04:05:09 +0000 Subject: factor out common HandleShow code for "show uptime" --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 808c760..618ce0a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -242,7 +242,7 @@ namespace OpenSim } } - protected virtual void AddPluginCommands(CommandConsole console) + protected virtual void AddPluginCommands(ICommandConsole console) { List topics = GetHelpTopics(); -- cgit v1.1 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/Region/Application/OpenSim.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 47252f6..e5aecbc 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -106,22 +106,6 @@ namespace OpenSim m_timeInterval = startupConfig.GetInt("timer_Interval", 1200); } - if (m_logFileAppender != null) - { - if (m_logFileAppender is log4net.Appender.FileAppender) - { - log4net.Appender.FileAppender appender = - (log4net.Appender.FileAppender)m_logFileAppender; - string fileName = startupConfig.GetString("LogFile", String.Empty); - if (fileName != String.Empty) - { - appender.File = fileName; - appender.ActivateOptions(); - } - m_log.InfoFormat("[LOGGING]: Logging started to file {0}", appender.File); - } - } - string asyncCallMethodStr = startupConfig.GetString("async_call_method", String.Empty); FireAndForgetMethod asyncCallMethod; if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse(asyncCallMethodStr, out asyncCallMethod)) @@ -174,6 +158,7 @@ namespace OpenSim MainConsole.Instance = m_console; + RegisterCommonAppenders(m_config.Source.Configs["Startup"]); RegisterConsoleCommands(); base.StartupSpecific(); -- cgit v1.1 From 9fcf3f1a3f3457debf0f59ba7659492b44172b99 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Nov 2012 05:48:41 +0000 Subject: Make "config show/set/get/save" console commands available on all servers --- OpenSim/Region/Application/ConfigurationLoader.cs | 1 - OpenSim/Region/Application/OpenSim.cs | 134 +--------------------- OpenSim/Region/Application/OpenSimBase.cs | 65 ++++------- 3 files changed, 29 insertions(+), 171 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 8d95c41..fc3999f 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -188,7 +188,6 @@ namespace OpenSim // Make sure command line options take precedence m_config.Source.Merge(argvSource); - IConfig enVars = m_config.Source.Configs["Environment"]; if( enVars != null ) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e5aecbc..e654cf7 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -82,8 +82,8 @@ namespace OpenSim { base.ReadExtraConfigSettings(); - IConfig startupConfig = m_config.Source.Configs["Startup"]; - IConfig networkConfig = m_config.Source.Configs["Network"]; + IConfig startupConfig = Config.Configs["Startup"]; + IConfig networkConfig = Config.Configs["Network"]; int stpMaxThreads = 15; @@ -148,7 +148,7 @@ namespace OpenSim break; case "rest": m_console = new RemoteConsole("Region"); - ((RemoteConsole)m_console).ReadConfig(m_config.Source); + ((RemoteConsole)m_console).ReadConfig(Config); break; default: m_console = new LocalConsole("Region"); @@ -158,7 +158,7 @@ namespace OpenSim MainConsole.Instance = m_console; - RegisterCommonAppenders(m_config.Source.Configs["Startup"]); + RegisterCommonAppenders(Config.Configs["Startup"]); RegisterConsoleCommands(); base.StartupSpecific(); @@ -357,26 +357,6 @@ namespace OpenSim "restart", "Restart all sims in this instance", RunCommand); - m_console.Commands.AddCommand("General", false, "config set", - "config set
", - "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); - - m_console.Commands.AddCommand("General", false, "config get", - "config get [
] []", - "Synonym for config show", - HandleConfig); - - m_console.Commands.AddCommand("General", false, "config show", - "config show [
] []", - "Show config information", - "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine - + "If a section is given but not a field, then all fields in that section are printed.", - HandleConfig); - - m_console.Commands.AddCommand("General", false, "config save", - "config save ", - "Save current configuration to a file at the given path", HandleConfig); - m_console.Commands.AddCommand("General", false, "command-script", "command-script