From 9a492258c967d96c67b710b0ad925b3292e34e69 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 19 Dec 2015 15:24:43 +0000 Subject: [PATCH] reduce xmlrpcgroups error messages if its debug option is off. Disable keepalive by default --- .../XmlRpcGroupsServicesConnectorModule.cs | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 20555e4fb6..76099634f9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -114,7 +114,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private string m_groupsServerURI = string.Empty; - private bool m_disableKeepAlive = false; + private bool m_disableKeepAlive = true; private string m_groupReadKey = string.Empty; private string m_groupWriteKey = string.Empty; @@ -174,12 +174,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups return; } - m_disableKeepAlive = groupsConfig.GetBoolean("XmlRpcDisableKeepAlive", false); + m_disableKeepAlive = groupsConfig.GetBoolean("XmlRpcDisableKeepAlive", true); m_groupReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", string.Empty); m_groupWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", string.Empty); - m_cacheTimeout = groupsConfig.GetInt("GroupsCacheTimeout", 30); if (m_cacheTimeout == 0) { @@ -985,21 +984,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups catch (Exception e) { m_log.ErrorFormat( - "[XMLRPC-GROUPS-CONNECTOR]: An error has occured while attempting to access the XmlRpcGroups server method {0} at {1}", - function, m_groupsServerURI); + "[XMLRPC-GROUPS-CONNECTOR]: An error has occured while attempting to access the XmlRpcGroups server method {0} at {1}: {2}", + function, m_groupsServerURI, e.Message); - m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0}{1}", e.Message, e.StackTrace); - - foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) + if(m_debugEnabled) { - m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} ", ResponseLine); - } + m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0}", e.StackTrace); - foreach (string key in param.Keys) - { - m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} :: {1}", key, param[key].ToString()); - } + foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) + { + m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} ", ResponseLine); + } + foreach (string key in param.Keys) + { + m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} :: {1}", key, param[key].ToString()); + } + } Hashtable respData = new Hashtable(); respData.Add("error", e.ToString()); return respData;