temporarily increasing logging in HGFriendsModule for debugging

iar_mods
Justin Clark-Casey (justincc) 2011-11-15 22:14:31 +00:00
parent e11b9dddb6
commit 122304317c
1 changed files with 24 additions and 1 deletions

View File

@ -85,6 +85,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
protected override bool CacheFriends(IClientAPI client) protected override bool CacheFriends(IClientAPI client)
{ {
m_log.DebugFormat("[HGFRIENDS MODULE]: Entered CacheFriends for {0}", client.Name);
if (base.CacheFriends(client)) if (base.CacheFriends(client))
{ {
UUID agentID = client.AgentId; UUID agentID = client.AgentId;
@ -109,14 +111,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
} }
} }
} }
m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting CacheFriends for {0} since detected root agent", client.Name);
return true; return true;
} }
} }
m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting CacheFriends for {0} since detected not root agent", client.Name);
return false; return false;
} }
public override bool SendFriendsOnlineIfNeeded(IClientAPI client) public override bool SendFriendsOnlineIfNeeded(IClientAPI client)
{ {
m_log.DebugFormat("[HGFRIENDS MODULE]: Entering SendFriendsOnlineIfNeeded for {0}", client.Name);
if (base.SendFriendsOnlineIfNeeded(client)) if (base.SendFriendsOnlineIfNeeded(client))
{ {
AgentCircuitData aCircuit = ((Scene)client.Scene).AuthenticateHandler.GetAgentCircuitData(client.AgentId); AgentCircuitData aCircuit = ((Scene)client.Scene).AuthenticateHandler.GetAgentCircuitData(client.AgentId);
@ -133,11 +141,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
} }
} }
} }
m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting SendFriendsOnlineIfNeeded for {0}", client.Name);
return false; return false;
} }
protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online) protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online)
{ {
m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetOnlineFriends for {0}", userID);
List<string> fList = new List<string>(); List<string> fList = new List<string>();
foreach (string s in friendList) foreach (string s in friendList)
{ {
@ -156,6 +168,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
if (UUID.TryParse(pi.UserID, out presenceID)) if (UUID.TryParse(pi.UserID, out presenceID))
online.Add(presenceID); online.Add(presenceID);
} }
m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetOnlineFriends for {0}", userID);
} }
//protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online) //protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online)
@ -245,6 +259,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online)
{ {
m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID);
// First, let's divide the friends on a per-domain basis // First, let's divide the friends on a per-domain basis
Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>();
foreach (FriendInfo friend in friendList) foreach (FriendInfo friend in friendList)
@ -297,6 +313,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
} }
} }
} }
m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting StatusNotify for {0}", userID);
} }
protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last)
@ -350,6 +368,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
protected override FriendInfo[] GetFriendsFromService(IClientAPI client) protected override FriendInfo[] GetFriendsFromService(IClientAPI client)
{ {
m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name);
UserAccount account1 = UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, client.AgentId); UserAccount account1 = UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, client.AgentId);
if (account1 != null) if (account1 != null)
return base.GetFriendsFromService(client); return base.GetFriendsFromService(client);
@ -364,6 +384,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
finfos = FriendsService.GetFriends(agentUUI); finfos = FriendsService.GetFriends(agentUUI);
m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, agentUUI); m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, agentUUI);
} }
m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name);
return finfos; return finfos;
} }