From 882af7195ca6d7ac5f36f4121f65aab1302ad272 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 16 May 2014 13:18:04 +0300 Subject: Better error-handling and logging in case User Profile requests fail --- .../Servers/HttpServer/JsonRpcRequestManager.cs | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework/Servers/HttpServer') diff --git a/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs index ed6a14c..2fe1a7d 100644 --- a/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs @@ -90,14 +90,14 @@ namespace OpenSim.Framework.Servers.HttpServer } catch (Exception e) { - m_log.Debug(string.Format("JsonRpc request '{0}' failed", method), e); + m_log.Debug(string.Format("JsonRpc request '{0}' to {1} failed", method, uri), e); return false; } if (!response.ContainsKey("_Result")) { - m_log.DebugFormat("JsonRpc request '{0}' returned an invalid response: {1}", - method, OSDParser.SerializeJsonString(response)); + m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an invalid response: {2}", + method, uri, OSDParser.SerializeJsonString(response)); return false; } response = (OSDMap)response["_Result"]; @@ -107,15 +107,15 @@ namespace OpenSim.Framework.Servers.HttpServer if (response.ContainsKey("error")) { data = response["error"]; - m_log.DebugFormat("JsonRpc request '{0}' returned an error: {1}", - method, OSDParser.SerializeJsonString(data)); + m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an error: {2}", + method, uri, OSDParser.SerializeJsonString(data)); return false; } if (!response.ContainsKey("result")) { - m_log.DebugFormat("JsonRpc request '{0}' returned an invalid response: {1}", - method, OSDParser.SerializeJsonString(response)); + m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an invalid response: {2}", + method, uri, OSDParser.SerializeJsonString(response)); return false; } @@ -161,14 +161,14 @@ namespace OpenSim.Framework.Servers.HttpServer } catch (Exception e) { - m_log.Debug(string.Format("JsonRpc request '{0}' failed", method), e); + m_log.Debug(string.Format("JsonRpc request '{0}' to {1} failed", method, uri), e); return false; } if (!response.ContainsKey("_Result")) { - m_log.DebugFormat("JsonRpc request '{0}' returned an invalid response: {1}", - method, OSDParser.SerializeJsonString(response)); + m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an invalid response: {2}", + method, uri, OSDParser.SerializeJsonString(response)); return false; } response = (OSDMap)response["_Result"]; @@ -176,8 +176,8 @@ namespace OpenSim.Framework.Servers.HttpServer if (response.ContainsKey("error")) { data = response["error"]; - m_log.DebugFormat("JsonRpc request '{0}' returned an error: {1}", - method, OSDParser.SerializeJsonString(data)); + m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an error: {2}", + method, uri, OSDParser.SerializeJsonString(data)); return false; } -- cgit v1.1