diff options
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 36 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 5 |
2 files changed, 33 insertions, 8 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index cbab2db..b28ad69 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -175,7 +175,7 @@ namespace OpenSim.Framework.Servers | |||
175 | 175 | ||
176 | m_console.Commands.AddCommand("base", false, "show info", | 176 | m_console.Commands.AddCommand("base", false, "show info", |
177 | "show info", | 177 | "show info", |
178 | "Show general information", HandleShow); | 178 | "Show general information about the server", HandleShow); |
179 | 179 | ||
180 | m_console.Commands.AddCommand("base", false, "show stats", | 180 | m_console.Commands.AddCommand("base", false, "show stats", |
181 | "show stats", | 181 | "show stats", |
@@ -371,8 +371,7 @@ namespace OpenSim.Framework.Servers | |||
371 | switch (showParams[0]) | 371 | switch (showParams[0]) |
372 | { | 372 | { |
373 | case "info": | 373 | case "info": |
374 | Notice("Version: " + m_version); | 374 | ShowInfo(); |
375 | Notice("Startup directory: " + m_startupDirectory); | ||
376 | break; | 375 | break; |
377 | 376 | ||
378 | case "stats": | 377 | case "stats": |
@@ -389,18 +388,30 @@ namespace OpenSim.Framework.Servers | |||
389 | break; | 388 | break; |
390 | 389 | ||
391 | case "version": | 390 | case "version": |
392 | Notice( | 391 | Notice(GetVersionText()); |
393 | String.Format( | ||
394 | "Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion)); | ||
395 | break; | 392 | break; |
396 | } | 393 | } |
397 | } | 394 | } |
395 | |||
396 | protected void ShowInfo() | ||
397 | { | ||
398 | Notice(GetVersionText()); | ||
399 | Notice("Startup directory: " + m_startupDirectory); | ||
400 | if (null != m_consoleAppender) | ||
401 | Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold)); | ||
402 | } | ||
403 | |||
404 | protected string GetVersionText() | ||
405 | { | ||
406 | return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion); | ||
407 | } | ||
398 | 408 | ||
399 | /// <summary> | 409 | /// <summary> |
400 | /// Console output is only possible if a console has been established. | 410 | /// Console output is only possible if a console has been established. |
401 | /// That is something that cannot be determined within this class. So | 411 | /// That is something that cannot be determined within this class. So |
402 | /// all attempts to use the console MUST be verified. | 412 | /// all attempts to use the console MUST be verified. |
403 | /// </summary> | 413 | /// </summary> |
414 | /// <param name="msg"></param> | ||
404 | protected void Notice(string msg) | 415 | protected void Notice(string msg) |
405 | { | 416 | { |
406 | if (m_console != null) | 417 | if (m_console != null) |
@@ -408,6 +419,19 @@ namespace OpenSim.Framework.Servers | |||
408 | m_console.Output(msg); | 419 | m_console.Output(msg); |
409 | } | 420 | } |
410 | } | 421 | } |
422 | |||
423 | /// <summary> | ||
424 | /// Console output is only possible if a console has been established. | ||
425 | /// That is something that cannot be determined within this class. So | ||
426 | /// all attempts to use the console MUST be verified. | ||
427 | /// </summary> | ||
428 | /// <param name="format"></param> | ||
429 | /// <param name="components"></param> | ||
430 | protected void Notice(string format, params string[] components) | ||
431 | { | ||
432 | if (m_console != null) | ||
433 | m_console.OutputFormat(format, components); | ||
434 | } | ||
411 | 435 | ||
412 | /// <summary> | 436 | /// <summary> |
413 | /// Enhance the version string with extra information if it's available. | 437 | /// Enhance the version string with extra information if it's available. |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 86ad7aa..d4ee7ba 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -587,8 +587,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
587 | // Every month or so this will wrap and give bad numbers, not really a problem | 587 | // Every month or so this will wrap and give bad numbers, not really a problem |
588 | // since its just for reporting, 200ms limit can be adjusted | 588 | // since its just for reporting, 200ms limit can be adjusted |
589 | int tickdiff = Environment.TickCount - tickstart; | 589 | int tickdiff = Environment.TickCount - tickstart; |
590 | if (tickdiff > 200) | 590 | if (tickdiff > 500) |
591 | m_log.InfoFormat("[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms",reqnum,request.RawUrl,tickdiff); | 591 | m_log.InfoFormat( |
592 | "[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff); | ||
592 | } | 593 | } |
593 | } | 594 | } |
594 | 595 | ||