Improved HTTP logging
parent
06e4fcd260
commit
88f7a833dc
|
@ -705,7 +705,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WebUtil.LogResponseDetail(null, output);
|
WebUtil.LogResponseDetail(RequestNumber, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!response.SendChunked && response.ContentLength64 <= 0)
|
if (!response.SendChunked && response.ContentLength64 <= 0)
|
||||||
|
|
|
@ -214,10 +214,9 @@ namespace OpenSim.Framework
|
||||||
LogOutgoingDetail(string.Format("RESPONSE {0}: ", reqnum), inputStream);
|
LogOutgoingDetail(string.Format("RESPONSE {0}: ", reqnum), inputStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LogResponseDetail(int? reqnum, string input)
|
public static void LogResponseDetail(int reqnum, string input)
|
||||||
{
|
{
|
||||||
string context = (reqnum == null) ? "" : string.Format("RESPONSE {0}: ", reqnum.Value);
|
LogOutgoingDetail(string.Format("RESPONSE {0}: ", reqnum), input);
|
||||||
LogOutgoingDetail(context, input);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed, bool rpc)
|
private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed, bool rpc)
|
||||||
|
|
|
@ -494,7 +494,12 @@ namespace OpenSim.Services.Connectors
|
||||||
private Dictionary<string,object> MakeRequest(string method,
|
private Dictionary<string,object> MakeRequest(string method,
|
||||||
Dictionary<string,object> sendData)
|
Dictionary<string,object> sendData)
|
||||||
{
|
{
|
||||||
sendData["METHOD"] = method;
|
// Add "METHOD" as the first key in the dictionary. This ensures that it will be
|
||||||
|
// visible even when using partial logging ("debug http all 5").
|
||||||
|
Dictionary<string, object> temp = sendData;
|
||||||
|
sendData = new Dictionary<string,object>{ { "METHOD", method } };
|
||||||
|
foreach (KeyValuePair<string, object> kvp in temp)
|
||||||
|
sendData.Add(kvp.Key, kvp.Value);
|
||||||
|
|
||||||
string reply = string.Empty;
|
string reply = string.Empty;
|
||||||
lock (m_Lock)
|
lock (m_Lock)
|
||||||
|
|
Loading…
Reference in New Issue