From a9b39d6e5d7961a03043e4a793dce8534035214a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Dec 2011 20:53:50 +0000 Subject: Tunnel [GroupsModule] DebugEnabled setting down into XmlRpcGroupsServicesConnectorModule so that we can record cache misses --- .../OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 9 +-------- .../XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 12 +++++++++--- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups') diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index d452905..8baeaa4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -29,25 +29,18 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Timers; - using log4net; using Mono.Addins; using Nini.Config; - using OpenMetaverse; using OpenMetaverse.StructuredData; - using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; - using OpenSim.Services.Interfaces; - using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; - - namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] @@ -90,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // Configuration settings private bool m_groupsEnabled = false; private bool m_groupNoticesEnabled = true; - private bool m_debugEnabled = true; + private bool m_debugEnabled = false; #region IRegionModuleBase Members diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index a08bcd0..52fc27d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -52,6 +52,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private bool m_debugEnabled = false; + public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | GroupPowers.Accountable | GroupPowers.JoinChat | @@ -81,7 +83,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private Dictionary> m_groupsAgentsDroppedFromChatSession = new Dictionary>(); private Dictionary> m_groupsAgentsInvitedToChatSession = new Dictionary>(); - #region IRegionModuleBase Members public string Name @@ -115,7 +116,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups return; } - m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name); + m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name); m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); if ((m_groupsServerURI == null) || @@ -142,6 +143,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Timeout set to {0}.", m_cacheTimeout); } + m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", false); + // If we got all the config options we need, lets start'er'up m_memoryCache = new ExpiringCache(); m_connectorEnabled = true; @@ -150,7 +153,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public void Close() { - m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Closing {0}", this.Name); + m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Closing {0}", this.Name); } public void AddRegion(OpenSim.Region.Framework.Scenes.Scene scene) @@ -958,6 +961,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (resp == null) { + if (m_debugEnabled) + m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Cache miss for key {0}", CacheKey); + string UserService; UUID SessionID; GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID); -- cgit v1.1