Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2011-01-23 23:29:25 +00:00
32 changed files with 576 additions and 480 deletions

View File

@@ -765,8 +765,8 @@ namespace OpenSim.Framework.Capabilities
{
try
{
m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
m_regionName);
// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
// m_regionName);
string capsBase = "/CAPS/" + m_capsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
@@ -1332,7 +1332,7 @@ namespace OpenSim.Framework.Capabilities
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
}
/// <summary>
@@ -1360,7 +1360,7 @@ namespace OpenSim.Framework.Capabilities
httpListener.RemoveStreamHandler("POST", uploaderPath);
m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
// m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
return res;
}

View File

@@ -75,6 +75,11 @@ namespace OpenSim.Framework.Console
{
System.Console.WriteLine(text);
}
public virtual void OutputFormat(string format, params string[] components)
{
Output(string.Format(format, components));
}
public string CmdPrompt(string p)
{

View File

@@ -175,7 +175,7 @@ namespace OpenSim.Framework.Servers
m_console.Commands.AddCommand("base", false, "show info",
"show info",
"Show general information", HandleShow);
"Show general information about the server", HandleShow);
m_console.Commands.AddCommand("base", false, "show stats",
"show stats",
@@ -371,8 +371,7 @@ namespace OpenSim.Framework.Servers
switch (showParams[0])
{
case "info":
Notice("Version: " + m_version);
Notice("Startup directory: " + m_startupDirectory);
ShowInfo();
break;
case "stats":
@@ -389,18 +388,30 @@ namespace OpenSim.Framework.Servers
break;
case "version":
Notice(
String.Format(
"Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion));
Notice(GetVersionText());
break;
}
}
protected void ShowInfo()
{
Notice(GetVersionText());
Notice("Startup directory: " + m_startupDirectory);
if (null != m_consoleAppender)
Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold));
}
protected string GetVersionText()
{
return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion);
}
/// <summary>
/// Console output is only possible if a console has been established.
/// That is something that cannot be determined within this class. So
/// all attempts to use the console MUST be verified.
/// </summary>
/// <param name="msg"></param>
protected void Notice(string msg)
{
if (m_console != null)
@@ -408,6 +419,19 @@ namespace OpenSim.Framework.Servers
m_console.Output(msg);
}
}
/// <summary>
/// Console output is only possible if a console has been established.
/// That is something that cannot be determined within this class. So
/// all attempts to use the console MUST be verified.
/// </summary>
/// <param name="format"></param>
/// <param name="components"></param>
protected void Notice(string format, params string[] components)
{
if (m_console != null)
m_console.OutputFormat(format, components);
}
/// <summary>
/// Enhance the version string with extra information if it's available.

View File

@@ -587,8 +587,9 @@ namespace OpenSim.Framework.Servers.HttpServer
// Every month or so this will wrap and give bad numbers, not really a problem
// since its just for reporting, 200ms limit can be adjusted
int tickdiff = Environment.TickCount - tickstart;
if (tickdiff > 200)
m_log.InfoFormat("[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms",reqnum,request.RawUrl,tickdiff);
if (tickdiff > 500)
m_log.InfoFormat(
"[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff);
}
}

View File

@@ -58,7 +58,7 @@ namespace OpenSim.Framework
// number of milliseconds a call can take before it is considered
// a "long" call for warning & debugging purposes
public const int LongCallTime = 200;
public const int LongCallTime = 500;
/// <summary>
/// Send LLSD to an HTTP client in application/llsd+json form