From a31792ee5cb1ce619f21f5b428926c4709c3f14b Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 6 Jan 2009 21:39:55 +0000 Subject: * prune and regrade log messages relating to client login and logout --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 8 +++--- .../Modules/Avatar/Friends/FriendsModule.cs | 10 ++----- .../Modules/Avatar/Groups/GroupsModule.cs | 33 +++++++++------------- .../Avatar/InstantMessage/PresenceModule.cs | 17 ++++++----- 4 files changed, 28 insertions(+), 40 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar') diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs index d281e44..64cd955 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -57,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory if (appearance != null) { //SetAppearanceAssets(profile, ref appearance); - m_log.InfoFormat("[APPEARANCE]: Found : {0}", appearance.ToString()); + //m_log.DebugFormat("[APPEARANCE]: Found : {0}", appearance.ToString()); return true; } } appearance = CreateDefault(avatarId); - m_log.InfoFormat("[APPEARANCE]: Appearance not found for {0}, creating default", avatarId); + m_log.ErrorFormat("[APPEARANCE]: Appearance not found for {0}, creating default", avatarId); return false; } @@ -172,11 +172,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory AvatarAppearance avatAppearance = null; if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) { - m_log.Info("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); + m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); avatAppearance = avatar.Appearance; } - m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); + //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); if (profile != null) { diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index b752404..580982d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -305,7 +305,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends if (m_rootAgents.ContainsKey(AgentId)) { m_rootAgents.Remove(AgentId); - m_log.Info("[FRIEND]: Removing " + AgentId + ". Agent was closed."); } } } @@ -315,7 +314,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends lock (m_rootAgents) { m_rootAgents[avatar.UUID] = avatar.RegionHandle; - m_log.Info("[FRIEND]: Claiming " + avatar.Firstname + " " + avatar.Lastname + " in region:" + avatar.RegionHandle + "."); // Claim User! my user! Mine mine mine! } } @@ -331,7 +329,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends if (m_rootAgents[avatar.UUID] == avatar.RegionHandle) { m_rootAgents.Remove(avatar.UUID); - m_log.Info("[FRIEND]: Removing " + avatar.Firstname + " " + avatar.Lastname + " as a root agent"); + m_log.Debug("[FRIEND]: Removing " + avatar.Firstname + " " + avatar.Lastname + " as a root agent"); } } } @@ -799,11 +797,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends /// private void SendPresenceState(IClientAPI client, List friendList, bool iAmOnline) { - m_log.DebugFormat("[FRIEND]: {0} logged {1}; sending presence updates", client.Name, iAmOnline ? "in" : "out"); + //m_log.DebugFormat("[FRIEND]: {0} logged {1}; sending presence updates", client.Name, iAmOnline ? "in" : "out"); if (friendList == null || friendList.Count == 0) { - m_log.DebugFormat("[FRIEND]: {0} doesn't have friends.", client.Name); + //m_log.DebugFormat("[FRIEND]: {0} doesn't have friends.", client.Name); return; // nothing we can do if she doesn't have friends... } @@ -984,8 +982,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends private void OnLogout(IClientAPI remoteClient) { - m_log.DebugFormat("[FRIEND]: Client {0} logged out", remoteClient.Name); - List fl; lock (m_friendLists) { diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs index eea8e40..dbb645e 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs @@ -64,13 +64,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups if (groupsConfig == null) { - m_log.Info("[GROUPS] No configuration found. Using defaults"); + m_log.Info("[GROUPS]: No configuration found. Using defaults"); } else { if (!groupsConfig.GetBoolean("Enabled", false)) { - m_log.Info("[GROUPS] Groups disabled in configuration"); + m_log.Info("[GROUPS]: Groups disabled in configuration"); return; } @@ -78,8 +78,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups return; } - m_log.Info("[GROUPS] Activated default groups module"); - lock (m_SceneList) { if (!m_SceneList.Contains(scene)) @@ -109,7 +107,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups public void Close() { - m_log.Info("[GROUP]: Shutting down group module."); +// m_log.Debug("[GROUPS]: Shutting down group module."); + lock (m_ClientMap) { m_ClientMap.Clear(); @@ -135,7 +134,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups private void OnNewClient(IClientAPI client) { - // Subscribe to instant messages client.OnInstantMessage += OnInstantMessage; client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; @@ -148,9 +146,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups } } - m_log.Info("[GROUP]: Adding " + client.Name + " to " + - osGroup.GroupName + " "); - GroupMembershipData[] updateGroups = new GroupMembershipData[1]; updateGroups[0] = osGroup; @@ -211,17 +206,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups { if (m_ClientMap.ContainsKey(agentID)) { - IClientAPI cli = m_ClientMap[agentID]; - if (cli != null) - { - m_log.Info("[GROUP]: Removing all reference to groups "+ - "for " + cli.Name); - } - else - { - m_log.Info("[GROUP]: Removing all reference to groups "+ - "for " + agentID.ToString()); - } +// IClientAPI cli = m_ClientMap[agentID]; +// if (cli != null) +// { +// //m_log.Info("[GROUPS]: Removing all reference to groups for " + cli.Name); +// } +// else +// { +// //m_log.Info("[GROUPS]: Removing all reference to groups for " + agentID.ToString()); +// } m_ClientMap.Remove(agentID); } } diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs index c811833..a7816b0 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs @@ -245,7 +245,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage // Triggered when the user logs off. public void OnLogout(IClientAPI client) { - m_log.DebugFormat("[PRESENCE]: Got OnLogout from {0}", client.Name); if (!(client.Scene is Scene)) return; Scene scene = (Scene)client.Scene; @@ -343,12 +342,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage Hashtable responseData = (Hashtable)resp.Value; if (responseData == null || (!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE") { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName); } } catch (System.Net.WebException) { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName); } } @@ -366,12 +365,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage Hashtable responseData = (Hashtable)resp.Value; if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE") { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName); } } catch (System.Net.WebException) { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName); } } @@ -391,12 +390,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage Hashtable responseData = (Hashtable)resp.Value; if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE") { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent location for {0}", agentID.ToString()); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent location for {0}", agentID.ToString()); } } catch (System.Net.WebException) { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent location for {0}", agentID.ToString()); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent location for {0}", agentID.ToString()); } } @@ -416,12 +415,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage Hashtable responseData = (Hashtable)resp.Value; if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE") { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent leaving for {0}", agentID.ToString()); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent leaving for {0}", agentID.ToString()); } } catch (System.Net.WebException) { - m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent leaving for {0}", agentID.ToString()); + m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent leaving for {0}", agentID.ToString()); } } } -- cgit v1.1