diff options
author | Jeff Ames | 2008-08-18 00:39:10 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-18 00:39:10 +0000 |
commit | 6ef9d4da901a346c232458317cca6268da888e2e (patch) | |
tree | dd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Framework/Servers/BaseOpenSimServer.cs | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.zip opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2 opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index e901b68..33081b9 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -89,7 +89,7 @@ namespace OpenSim.Framework.Servers | |||
89 | 89 | ||
90 | m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics); | 90 | m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics); |
91 | m_periodicDiagnosticsTimer.Enabled = true; | 91 | m_periodicDiagnosticsTimer.Enabled = true; |
92 | 92 | ||
93 | // Add ourselves to thread monitoring. This thread will go on to become the console listening thread | 93 | // Add ourselves to thread monitoring. This thread will go on to become the console listening thread |
94 | Thread.CurrentThread.Name = "ConsoleThread"; | 94 | Thread.CurrentThread.Name = "ConsoleThread"; |
95 | ThreadTracker.Add(Thread.CurrentThread); | 95 | ThreadTracker.Add(Thread.CurrentThread); |
@@ -102,15 +102,15 @@ namespace OpenSim.Framework.Servers | |||
102 | { | 102 | { |
103 | StringBuilder sb = new StringBuilder("DIAGNOSTICS\n\n"); | 103 | StringBuilder sb = new StringBuilder("DIAGNOSTICS\n\n"); |
104 | sb.Append(GetUptimeReport()); | 104 | sb.Append(GetUptimeReport()); |
105 | 105 | ||
106 | if (m_stats != null) | 106 | if (m_stats != null) |
107 | { | 107 | { |
108 | sb.Append(m_stats.Report()); | 108 | sb.Append(m_stats.Report()); |
109 | } | 109 | } |
110 | 110 | ||
111 | m_log.Debug(sb); | 111 | m_log.Debug(sb); |
112 | } | 112 | } |
113 | 113 | ||
114 | /// <summary> | 114 | /// <summary> |
115 | /// Return a report about the uptime of this server | 115 | /// Return a report about the uptime of this server |
116 | /// </summary> | 116 | /// </summary> |
@@ -120,10 +120,10 @@ namespace OpenSim.Framework.Servers | |||
120 | StringBuilder sb = new StringBuilder(String.Format("Time now is {0}\n", DateTime.Now)); | 120 | StringBuilder sb = new StringBuilder(String.Format("Time now is {0}\n", DateTime.Now)); |
121 | sb.Append(String.Format("Server has been running since {0}, {1}\n", m_startuptime.DayOfWeek, m_startuptime)); | 121 | sb.Append(String.Format("Server has been running since {0}, {1}\n", m_startuptime.DayOfWeek, m_startuptime)); |
122 | sb.Append(String.Format("That is an elapsed time of {0}\n", DateTime.Now - m_startuptime)); | 122 | sb.Append(String.Format("That is an elapsed time of {0}\n", DateTime.Now - m_startuptime)); |
123 | 123 | ||
124 | return sb.ToString(); | 124 | return sb.ToString(); |
125 | } | 125 | } |
126 | 126 | ||
127 | /// <summary> | 127 | /// <summary> |
128 | /// Set the level of log notices being echoed to the console | 128 | /// Set the level of log notices being echoed to the console |
129 | /// </summary> | 129 | /// </summary> |
@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Servers | |||
133 | ILoggerRepository repository = LogManager.GetRepository(); | 133 | ILoggerRepository repository = LogManager.GetRepository(); |
134 | IAppender[] appenders = repository.GetAppenders(); | 134 | IAppender[] appenders = repository.GetAppenders(); |
135 | OpenSimAppender consoleAppender = null; | 135 | OpenSimAppender consoleAppender = null; |
136 | 136 | ||
137 | foreach (IAppender appender in appenders) | 137 | foreach (IAppender appender in appenders) |
138 | { | 138 | { |
139 | if (appender.Name == "Console") | 139 | if (appender.Name == "Console") |
@@ -142,13 +142,13 @@ namespace OpenSim.Framework.Servers | |||
142 | break; | 142 | break; |
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | if (null == consoleAppender) | 146 | if (null == consoleAppender) |
147 | { | 147 | { |
148 | Notice("No appender named Console found (see the log4net config file for this executable)!"); | 148 | Notice("No appender named Console found (see the log4net config file for this executable)!"); |
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | 151 | ||
152 | if (setParams.Length > 0) | 152 | if (setParams.Length > 0) |
153 | { | 153 | { |
154 | Level consoleLevel = repository.LevelMap[setParams[0]]; | 154 | Level consoleLevel = repository.LevelMap[setParams[0]]; |
@@ -160,12 +160,12 @@ namespace OpenSim.Framework.Servers | |||
160 | "{0} is not a valid logging level. Valid logging levels are ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF", | 160 | "{0} is not a valid logging level. Valid logging levels are ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF", |
161 | setParams[0])); | 161 | setParams[0])); |
162 | } | 162 | } |
163 | 163 | ||
164 | // If there is no threshold set then the threshold is effectively everything. | 164 | // If there is no threshold set then the threshold is effectively everything. |
165 | Level thresholdLevel | 165 | Level thresholdLevel |
166 | = (null != consoleAppender.Threshold ? consoleAppender.Threshold : log4net.Core.Level.All); | 166 | = (null != consoleAppender.Threshold ? consoleAppender.Threshold : log4net.Core.Level.All); |
167 | 167 | ||
168 | Notice(String.Format("Console log level is {0}", thresholdLevel)); | 168 | Notice(String.Format("Console log level is {0}", thresholdLevel)); |
169 | } | 169 | } |
170 | 170 | ||
171 | /// <summary> | 171 | /// <summary> |
@@ -203,7 +203,7 @@ namespace OpenSim.Framework.Servers | |||
203 | Notice(""); | 203 | Notice(""); |
204 | Notice("quit - equivalent to shutdown."); | 204 | Notice("quit - equivalent to shutdown."); |
205 | 205 | ||
206 | Notice("set log level [level] - change the console logging level only. For example, off or debug."); | 206 | Notice("set log level [level] - change the console logging level only. For example, off or debug."); |
207 | Notice("show info - show server information (e.g. startup path)."); | 207 | Notice("show info - show server information (e.g. startup path)."); |
208 | 208 | ||
209 | if (m_stats != null) | 209 | if (m_stats != null) |
@@ -219,7 +219,7 @@ namespace OpenSim.Framework.Servers | |||
219 | case "set": | 219 | case "set": |
220 | Set(cmdparams); | 220 | Set(cmdparams); |
221 | break; | 221 | break; |
222 | 222 | ||
223 | case "show": | 223 | case "show": |
224 | if (cmdparams.Length > 0) | 224 | if (cmdparams.Length > 0) |
225 | { | 225 | { |
@@ -232,8 +232,8 @@ namespace OpenSim.Framework.Servers | |||
232 | Shutdown(); | 232 | Shutdown(); |
233 | break; | 233 | break; |
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | /// <summary> | 237 | /// <summary> |
238 | /// Set an OpenSim parameter | 238 | /// Set an OpenSim parameter |
239 | /// </summary> | 239 | /// </summary> |
@@ -245,15 +245,15 @@ namespace OpenSim.Framework.Servers | |||
245 | // Temporary while we only have one command which takes at least two parameters | 245 | // Temporary while we only have one command which takes at least two parameters |
246 | if (setArgs.Length < 2) | 246 | if (setArgs.Length < 2) |
247 | return; | 247 | return; |
248 | 248 | ||
249 | if (setArgs[0] == "log" && setArgs[1] == "level") | 249 | if (setArgs[0] == "log" && setArgs[1] == "level") |
250 | { | 250 | { |
251 | string[] setParams = new string[setArgs.Length - 2]; | 251 | string[] setParams = new string[setArgs.Length - 2]; |
252 | Array.Copy(setArgs, 2, setParams, 0, setArgs.Length - 2); | 252 | Array.Copy(setArgs, 2, setParams, 0, setArgs.Length - 2); |
253 | 253 | ||
254 | SetConsoleLogLevel(setParams); | 254 | SetConsoleLogLevel(setParams); |
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
258 | /// <summary> | 258 | /// <summary> |
259 | /// Outputs to the console information about the region | 259 | /// Outputs to the console information about the region |
@@ -276,7 +276,7 @@ namespace OpenSim.Framework.Servers | |||
276 | Notice(m_stats.Report()); | 276 | Notice(m_stats.Report()); |
277 | } | 277 | } |
278 | break; | 278 | break; |
279 | 279 | ||
280 | case "threads": | 280 | case "threads": |
281 | List<Thread> threads = ThreadTracker.GetThreads(); | 281 | List<Thread> threads = ThreadTracker.GetThreads(); |
282 | if (threads == null) | 282 | if (threads == null) |
@@ -291,7 +291,7 @@ namespace OpenSim.Framework.Servers | |||
291 | Notice("ID: " + t.ManagedThreadId.ToString() + ", Name: " + t.Name + ", Alive: " + t.IsAlive.ToString() + ", Pri: " + t.Priority.ToString() + ", State: " + t.ThreadState.ToString()); | 291 | Notice("ID: " + t.ManagedThreadId.ToString() + ", Name: " + t.Name + ", Alive: " + t.IsAlive.ToString() + ", Pri: " + t.Priority.ToString() + ", State: " + t.ThreadState.ToString()); |
292 | } | 292 | } |
293 | } | 293 | } |
294 | break; | 294 | break; |
295 | 295 | ||
296 | case "uptime": | 296 | case "uptime": |
297 | Notice(GetUptimeReport()); | 297 | Notice(GetUptimeReport()); |
@@ -301,7 +301,7 @@ namespace OpenSim.Framework.Servers | |||
301 | Notice("Version: " + m_version); | 301 | Notice("Version: " + m_version); |
302 | break; | 302 | break; |
303 | } | 303 | } |
304 | } | 304 | } |
305 | 305 | ||
306 | /// <summary> | 306 | /// <summary> |
307 | /// Console output is only possible if a console has been established. | 307 | /// Console output is only possible if a console has been established. |