From 1f402fdf5e8ef53a07f98c4447946805791d26bc Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 7 Feb 2012 21:40:28 +0000 Subject: Add url to logging if SynchronousRestFormsRequester.MakRequest() throws an exception in service connectors --- .../Connectors/Hypergrid/HGFriendsServiceConnector.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services/Connectors/Hypergrid') diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs index d699f59..af4b0da 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs @@ -79,11 +79,12 @@ namespace OpenSim.Services.Connectors.Hypergrid sendData["SESSIONID"] = m_SessionID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/hgfriends"; try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/hgfriends", + uri, reqString); if (reply != string.Empty) { @@ -103,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid } catch (Exception e) { - m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); } return 0; @@ -123,15 +124,16 @@ namespace OpenSim.Services.Connectors.Hypergrid sendData["SESSIONID"] = m_SessionID.ToString(); string reply = string.Empty; + string uri = m_ServerURI + "/hgfriends"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/hgfriends", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); return false; } @@ -168,15 +170,16 @@ namespace OpenSim.Services.Connectors.Hypergrid sendData["SECRET"] = secret; string reply = string.Empty; + string uri = m_ServerURI + "/hgfriends"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/hgfriends", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); return false; } -- cgit v1.1