aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/ServerBase.cs
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Framework/Servers/ServerBase.cs
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Framework/Servers/ServerBase.cs')
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index 7b806a4..8965e71 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Framework.Servers
56 protected ICommandConsole m_console; 56 protected ICommandConsole m_console;
57 57
58 protected OpenSimAppender m_consoleAppender; 58 protected OpenSimAppender m_consoleAppender;
59 protected FileAppender m_logFileAppender; 59 protected FileAppender m_logFileAppender;
60 60
61 protected DateTime m_startuptime; 61 protected DateTime m_startuptime;
62 protected string m_startupDirectory = Environment.CurrentDirectory; 62 protected string m_startupDirectory = Environment.CurrentDirectory;
@@ -81,7 +81,7 @@ namespace OpenSim.Framework.Servers
81 { 81 {
82 if (File.Exists(path)) 82 if (File.Exists(path))
83 m_log.ErrorFormat( 83 m_log.ErrorFormat(
84 "[SERVER BASE]: Previous pid file {0} still exists on startup. Possibly previously unclean shutdown.", 84 "[SERVER BASE]: Previous pid file {0} still exists on startup. Possibly previously unclean shutdown.",
85 path); 85 path);
86 86
87 try 87 try
@@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
103 m_log.Warn(string.Format("[SERVER BASE]: Could not create PID file at {0} ", path), e); 103 m_log.Warn(string.Format("[SERVER BASE]: Could not create PID file at {0} ", path), e);
104 } 104 }
105 } 105 }
106 106
107 protected void RemovePIDFile() 107 protected void RemovePIDFile()
108 { 108 {
109 if (m_pidFile != String.Empty) 109 if (m_pidFile != String.Empty)
@@ -166,11 +166,11 @@ namespace OpenSim.Framework.Servers
166 { 166 {
167 // FIXME: This should be done through an interface rather than casting. 167 // FIXME: This should be done through an interface rather than casting.
168 m_consoleAppender.Console = (ConsoleBase)m_console; 168 m_consoleAppender.Console = (ConsoleBase)m_console;
169 169
170 // If there is no threshold set then the threshold is effectively everything. 170 // If there is no threshold set then the threshold is effectively everything.
171 if (null == m_consoleAppender.Threshold) 171 if (null == m_consoleAppender.Threshold)
172 m_consoleAppender.Threshold = Level.All; 172 m_consoleAppender.Threshold = Level.All;
173 173
174 Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold)); 174 Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold));
175 } 175 }
176 176
@@ -205,11 +205,11 @@ namespace OpenSim.Framework.Servers
205 "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow); 205 "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow);
206 206
207 m_console.Commands.AddCommand( 207 m_console.Commands.AddCommand(
208 "General", false, "get log level", "get log level", "Get the current console logging level", 208 "General", false, "get log level", "get log level", "Get the current console logging level",
209 (mod, cmd) => ShowLogLevel()); 209 (mod, cmd) => ShowLogLevel());
210 210
211 m_console.Commands.AddCommand( 211 m_console.Commands.AddCommand(
212 "General", false, "set log level", "set log level <level>", 212 "General", false, "set log level", "set log level <level>",
213 "Set the console logging level for this session.", HandleSetLogLevel); 213 "Set the console logging level for this session.", HandleSetLogLevel);
214 214
215 m_console.Commands.AddCommand( 215 m_console.Commands.AddCommand(
@@ -222,14 +222,14 @@ namespace OpenSim.Framework.Servers
222 "config get [<section>] [<key>]", 222 "config get [<section>] [<key>]",
223 "Synonym for config show", 223 "Synonym for config show",
224 HandleConfig); 224 HandleConfig);
225 225
226 m_console.Commands.AddCommand( 226 m_console.Commands.AddCommand(
227 "General", false, "config show", 227 "General", false, "config show",
228 "config show [<section>] [<key>]", 228 "config show [<section>] [<key>]",
229 "Show config information", 229 "Show config information",
230 "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine 230 "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine
231 + "If a section is given but not a field, then all fields in that section are printed.", 231 + "If a section is given but not a field, then all fields in that section are printed.",
232 HandleConfig); 232 HandleConfig);
233 233
234 m_console.Commands.AddCommand( 234 m_console.Commands.AddCommand(
235 "General", false, "config save", 235 "General", false, "config save",
@@ -280,7 +280,7 @@ namespace OpenSim.Framework.Servers
280 "debug threadpool status", 280 "debug threadpool status",
281 "Show current debug threadpool parameters.", 281 "Show current debug threadpool parameters.",
282 HandleDebugThreadpoolStatus); 282 HandleDebugThreadpoolStatus);
283 283
284 m_console.Commands.AddCommand( 284 m_console.Commands.AddCommand(
285 "Debug", false, "debug threadpool level", 285 "Debug", false, "debug threadpool level",
286 "debug threadpool level 0.." + Util.MAX_THREADPOOL_LEVEL, 286 "debug threadpool level 0.." + Util.MAX_THREADPOOL_LEVEL,
@@ -332,7 +332,7 @@ namespace OpenSim.Framework.Servers
332 { 332 {
333 WebUtil.SerializeOSDRequestsPerEndpoint = networkConfig.GetBoolean("SerializeOSDRequests", false); 333 WebUtil.SerializeOSDRequestsPerEndpoint = networkConfig.GetBoolean("SerializeOSDRequests", false);
334 } 334 }
335 335
336 m_serverStatsCollector = new ServerStatsCollector(); 336 m_serverStatsCollector = new ServerStatsCollector();
337 m_serverStatsCollector.Initialise(configSource); 337 m_serverStatsCollector.Initialise(configSource);
338 m_serverStatsCollector.Start(); 338 m_serverStatsCollector.Start();
@@ -432,7 +432,7 @@ namespace OpenSim.Framework.Servers
432 432
433 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads); 433 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads);
434 Notice("Available worker threads: {0}", workerThreads); 434 Notice("Available worker threads: {0}", workerThreads);
435 Notice("Available IOCP threads: {0}", iocpThreads); 435 Notice("Available IOCP threads: {0}", iocpThreads);
436 } 436 }
437 437
438 private void HandleDebugThreadpoolSet(string module, string[] args) 438 private void HandleDebugThreadpoolSet(string module, string[] args)
@@ -488,7 +488,7 @@ namespace OpenSim.Framework.Servers
488 fail = true; 488 fail = true;
489 } 489 }
490 } 490 }
491 491
492 if (fail) 492 if (fail)
493 { 493 {
494 Notice("ERROR: Could not set {0} {1} threads to {2}", poolType, bound, newThreads); 494 Notice("ERROR: Could not set {0} {1} threads to {2}", poolType, bound, newThreads);
@@ -582,7 +582,7 @@ namespace OpenSim.Framework.Servers
582 if (cmdparams.Length > 0) 582 if (cmdparams.Length > 0)
583 { 583 {
584 string firstParam = cmdparams[0].ToLower(); 584 string firstParam = cmdparams[0].ToLower();
585 585
586 switch (firstParam) 586 switch (firstParam)
587 { 587 {
588 case "set": 588 case "set":
@@ -633,12 +633,12 @@ namespace OpenSim.Framework.Servers
633 { 633 {
634 Notice("[{0}]", config.Name); 634 Notice("[{0}]", config.Name);
635 foreach (string key in config.GetKeys()) 635 foreach (string key in config.GetKeys())
636 Notice(" {0} = {1}", key, config.GetString(key)); 636 Notice(" {0} = {1}", key, config.GetString(key));
637 } 637 }
638 else 638 else
639 { 639 {
640 Notice( 640 Notice(
641 "config get {0} {1} : {2}", 641 "config get {0} {1} : {2}",
642 cmdparams[1], cmdparams[2], config.GetString(cmdparams[2])); 642 cmdparams[1], cmdparams[2], config.GetString(cmdparams[2]));
643 } 643 }
644 } 644 }
@@ -692,10 +692,10 @@ namespace OpenSim.Framework.Servers
692 } 692 }
693 693
694 string rawLevel = cmd[3]; 694 string rawLevel = cmd[3];
695 695
696 ILoggerRepository repository = LogManager.GetRepository(); 696 ILoggerRepository repository = LogManager.GetRepository();
697 Level consoleLevel = repository.LevelMap[rawLevel]; 697 Level consoleLevel = repository.LevelMap[rawLevel];
698 698
699 if (consoleLevel != null) 699 if (consoleLevel != null)
700 m_consoleAppender.Threshold = consoleLevel; 700 m_consoleAppender.Threshold = consoleLevel;
701 else 701 else
@@ -770,9 +770,9 @@ namespace OpenSim.Framework.Servers
770 protected void ShowInfo() 770 protected void ShowInfo()
771 { 771 {
772 Notice(GetVersionText()); 772 Notice(GetVersionText());
773 Notice("Startup directory: " + m_startupDirectory); 773 Notice("Startup directory: " + m_startupDirectory);
774 if (null != m_consoleAppender) 774 if (null != m_consoleAppender)
775 Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold)); 775 Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold));
776 } 776 }
777 777
778 /// <summary> 778 /// <summary>
@@ -873,7 +873,7 @@ namespace OpenSim.Framework.Servers
873 873
874 public string GetVersionText() 874 public string GetVersionText()
875 { 875 {
876 return String.Format("Version: {0} (SIMULATION/{1} - SIMULATION/{2})", 876 return String.Format("Version: {0} (SIMULATION/{1} - SIMULATION/{2})",
877 m_version, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax); 877 m_version, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax);
878 } 878 }
879 879
@@ -898,7 +898,7 @@ namespace OpenSim.Framework.Servers
898 foreach (Watchdog.ThreadWatchdogInfo twi in threads) 898 foreach (Watchdog.ThreadWatchdogInfo twi in threads)
899 { 899 {
900 Thread t = twi.Thread; 900 Thread t = twi.Thread;
901 901
902 sb.AppendFormat( 902 sb.AppendFormat(
903 reportFormat, 903 reportFormat,
904 t.ManagedThreadId, 904 t.ManagedThreadId,
@@ -1005,7 +1005,7 @@ namespace OpenSim.Framework.Servers
1005 MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId); 1005 MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
1006 else 1006 else
1007 MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId); 1007 MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
1008 } 1008 }
1009 1009
1010 /// <summary> 1010 /// <summary>
1011 /// Console output is only possible if a console has been established. 1011 /// Console output is only possible if a console has been established.
@@ -1020,13 +1020,13 @@ namespace OpenSim.Framework.Servers
1020 m_console.Output(msg); 1020 m_console.Output(msg);
1021 } 1021 }
1022 } 1022 }
1023 1023
1024 /// <summary> 1024 /// <summary>
1025 /// Console output is only possible if a console has been established. 1025 /// Console output is only possible if a console has been established.
1026 /// That is something that cannot be determined within this class. So 1026 /// That is something that cannot be determined within this class. So
1027 /// all attempts to use the console MUST be verified. 1027 /// all attempts to use the console MUST be verified.
1028 /// </summary> 1028 /// </summary>
1029 /// <param name="format"></param> 1029 /// <param name="format"></param>
1030 /// <param name="components"></param> 1030 /// <param name="components"></param>
1031 protected void Notice(string format, params object[] components) 1031 protected void Notice(string format, params object[] components)
1032 { 1032 {