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 --- OpenSim/Framework/ClientManager.cs | 2 - .../Cache/UserProfileCacheService.cs | 3 +- .../Framework/Communications/Capabilities/Caps.cs | 12 ++++-- .../Framework/Communications/UserManagerBase.cs | 3 -- OpenSim/Grid/UserServer/UserLoginService.cs | 2 +- .../Region/ClientStack/LindenUDP/LLClientView.cs | 10 ++--- .../Region/ClientStack/LindenUDP/LLPacketQueue.cs | 2 - .../Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 +-- .../Communications/Local/LocalLoginService.cs | 2 +- .../Region/Communications/OGS1/OGS1GridServices.cs | 4 +- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 8 ++-- .../Modules/Avatar/Friends/FriendsModule.cs | 10 ++--- .../Modules/Avatar/Groups/GroupsModule.cs | 33 ++++++--------- .../Avatar/InstantMessage/PresenceModule.cs | 17 ++++---- .../Framework/EventQueue/EventQueueGetModule.cs | 48 ++++++++++------------ .../Environment/Modules/World/Sun/SunModule.cs | 18 ++++---- .../Environment/Modules/World/Wind/WindModule.cs | 48 ++++------------------ .../Modules/World/WorldMap/WorldMapModule.cs | 15 +++---- OpenSim/Region/Environment/Scenes/Scene.cs | 10 ----- .../Scenes/SceneCommunicationService.cs | 2 - OpenSim/Region/Environment/Scenes/ScenePresence.cs | 18 ++------ 21 files changed, 92 insertions(+), 181 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index cdccf0e..6ea12c1 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs @@ -71,12 +71,10 @@ namespace OpenSim.Framework public void Remove(uint id) { - //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count); lock (m_clients) { m_clients.Remove(id); } - m_log.InfoFormat("[CLIENT]: Removed client with code {0}, new client count {1}", id, m_clients.Count); } public void Add(uint id, IClientAPI client) diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 0cbb717..22aab10 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -80,7 +80,7 @@ namespace OpenSim.Framework.Communications.Cache if (userID == UUID.Zero) return; - m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); + //m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); GetUserDetails(userID); } @@ -95,7 +95,6 @@ namespace OpenSim.Framework.Communications.Cache { if (m_userProfiles.ContainsKey(userId)) { - m_log.DebugFormat("[USER CACHE]: Removing user {0}", userId); m_userProfiles.Remove(userId); return true; } diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 91acfbe..6adf68c 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -157,7 +157,9 @@ namespace OpenSim.Framework.Communications.Capabilities { // the root of all evil m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest); - m_log.Warn("[SEED]: " + capsBase + m_requestPath); + m_log.DebugFormat( + "[CAPS]: Registering seed capability {0} for {1}", capsBase + m_requestPath, m_agentID); + //m_capsHandlers["MapLayer"] = // new LLSDStreamhandler("POST", // capsBase + m_mapLayerPath, @@ -209,7 +211,7 @@ namespace OpenSim.Framework.Communications.Capabilities public void RegisterHandler(string capName, IRequestHandler handler) { m_capsHandlers[capName] = handler; - m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path); + //m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path); } /// @@ -242,10 +244,12 @@ namespace OpenSim.Framework.Communications.Capabilities public string CapsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { - m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); - //Console.WriteLine("caps request " + request); + //m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); + string result = LLSDHelpers.SerialiseLLSDReply(m_capsHandlers.CapsDetails); + //m_log.DebugFormat("[CAPS] CapsRequest {0}", result); + return result; } diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 3f2b902..2e3efd5 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -547,9 +547,6 @@ namespace OpenSim.Framework.Communications if (userProfile != null) { - // This line needs to be in side the above if statement or the UserServer will crash on some logouts. - m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + position.X + "," + position.Y + "," + position.Z + ")"); - UserAgentData userAgent = userProfile.CurrentAgent; if (userAgent != null) { diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index cca5be2..a4c8065 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -277,7 +277,7 @@ namespace OpenSim.Grid.UserServer private void AddActiveGestures(LoginResponse response, UserProfileData theUser) { List gestures = m_inventoryService.GetActiveGestures(theUser.ID); - m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count); + //m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count); ArrayList list = new ArrayList(); if (gestures != null) { diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 38450ed..6742948 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -534,8 +534,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_clientPingTimer.Enabled = false; m_log.DebugFormat( - "[CLIENT]: Close has been called with shutdownCircuit = {0} on scene {1}", - shutdownCircuit, m_scene.RegionInfo.RegionName); + "[CLIENT]: Close has been called with shutdownCircuit = {0} for {1} attached to scene {2}", + shutdownCircuit, Name, m_scene.RegionInfo.RegionName); m_PacketHandler.Flush(); @@ -724,7 +724,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected virtual void ClientLoop() { m_log.DebugFormat( - "[CLIENT]: Entered main packet processing loop for {0} {1}", FirstName, LastName); + "[CLIENT]: Entered main packet processing loop for {0} in {1}", Name, Scene.RegionInfo.RegionName); while (IsActive) { @@ -3807,7 +3807,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected virtual bool Logout(IClientAPI client) { - m_log.Info("[CLIENT]: Got a logout request"); + m_log.InfoFormat("[CLIENT]: Got a logout request for {0} in {1}", Name, Scene.RegionInfo.RegionName); handlerLogout = OnLogout; @@ -4419,8 +4419,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerRequestWearables != null) { - m_log.DebugFormat("[APPEARANCE]: Wearables requested by {0}", Name); - handlerRequestWearables(); } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 365c35f..17c3f97 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -258,7 +258,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void WipeClean() { - m_log.Info("[PACKETQUEUE] Wiping Packet Queues Clean"); lock (this) { ResendOutgoingPacketQueue.Clear(); @@ -275,7 +274,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void Close() { - m_log.Info("[PACKETQUEUE] Close called"); Flush(); WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 2daf425..f1a3c7f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -407,9 +407,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// protected virtual void AddNewClient(UseCircuitCodePacket useCircuit, EndPoint epSender, EndPoint epProxy) - { - m_log.Debug("[CONNECTION DEBUGGING] AddNewClient Called"); - + { //Slave regions don't accept new clients if (m_localScene.Region_Status != RegionStatus.SlaveScene) { @@ -426,7 +424,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - m_log.Info("[CLIENT]: Got authenticated connection from " + epSender); + m_log.Debug("[CLIENT]: Got authenticated connection from " + epSender); } lock (clientCircuits) diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 9ee10e8..c572b3b 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -266,7 +266,7 @@ namespace OpenSim.Region.Communications.Local private void AddActiveGestures(LoginResponse response, UserProfileData theUser) { List gestures = m_interServiceInventoryService.GetActiveGestures(theUser.ID); - m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count); + //m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count); ArrayList list = new ArrayList(); if (gestures != null) { diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index fe69408..64e184d 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -622,12 +622,12 @@ namespace OpenSim.Region.Communications.OGS1 if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) { - m_log.Debug("[CLIENT]: Child agent detected"); + //m_log.Debug("[CLIENT]: Child agent detected"); agentData.child = true; } else { - m_log.Debug("[CLIENT]: Main agent detected"); + //m_log.Debug("[CLIENT]: Main agent detected"); agentData.startpos = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), (float)Convert.ToDecimal((string)requestData["startpos_y"]), 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()); } } } diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs index 9006fe0..3f46e95 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs @@ -72,7 +72,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue private Dictionary queues = new Dictionary(); private Dictionary m_QueueUUIDAvatarMapping = new Dictionary(); private Dictionary m_AvatarQueueUUIDMapping = new Dictionary(); - #region IRegionModule methods public void Initialise(Scene scene, IConfigSource config) @@ -101,11 +100,8 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue // circuit is there. scene.EventManager.OnClientClosed += ClientClosed; - scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; scene.EventManager.OnMakeChildAgent += MakeChildAgent; scene.EventManager.OnRegisterCaps += OnRegisterCaps; - - m_log.DebugFormat("[EVENTQUEUE]: Enabled EventQueueGetModule for region {0}", scene.RegionInfo.RegionName); } else { @@ -149,10 +145,13 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue { if (!queues.ContainsKey(agentId)) { - m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, - m_scene.RegionInfo.RegionName); + m_log.DebugFormat( + "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", + agentId, m_scene.RegionInfo.RegionName); + queues[agentId] = new BlockingLLSDQueue(); } + return queues[agentId]; } } @@ -179,17 +178,19 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue public bool Enqueue(OSD ev, UUID avatarID) { - m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); + //m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); try { BlockingLLSDQueue queue = GetQueue(avatarID); if (queue != null) queue.Enqueue(ev); - } catch(NullReferenceException e) + } + catch(NullReferenceException e) { - m_log.Debug("[EVENTQUEUE] Caught exception: " + e); + m_log.Error("[EVENTQUEUE] Caught exception: " + e); return false; } + return true; } @@ -234,7 +235,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue { m_AvatarQueueUUIDMapping.Remove(ky); m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/"); - m_log.Debug("[EVENTQUEUE]: Removing " + "/CAPS/EQG/" + ky.ToString() + "/"); } } @@ -258,14 +258,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue m_QueueUUIDAvatarMapping.Remove(ky); } - - m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered in region {1}.", AgentID, m_scene.RegionInfo.RegionName); - } - - private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) - { - m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.", - avatar.UUID, localLandID, m_scene.RegionInfo.RegionName); } private void MakeChildAgent(ScenePresence avatar) @@ -283,7 +275,11 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue public void OnRegisterCaps(UUID agentID, Caps caps) { - m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1} region {2}", agentID, caps, m_scene.RegionInfo.RegionName); + // Register an event queue for the client + + //m_log.DebugFormat( + // "[EVENTQUEUE]: OnRegisterCaps: agentID {0} caps {1} region {2}", + // agentID, caps, m_scene.RegionInfo.RegionName); // Let's instantiate a Queue for this agent right now TryGetQueue(agentID); @@ -302,7 +298,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue else { EventQueueGetUUID = UUID.Random(); - m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!"); + //m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!"); } } @@ -318,13 +314,12 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue m_AvatarQueueUUIDMapping.Add(agentID, EventQueueGetUUID); } - m_log.DebugFormat("[EVENTQUEUE]: CAPS URL: {0}", capsBase + EventQueueGetUUID.ToString() + "/"); // Register this as a caps handler caps.RegisterHandler("EventQueueGet", new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", delegate(Hashtable m_dhttpMethod) { - return ProcessQueue(m_dhttpMethod,agentID, caps); + return ProcessQueue(m_dhttpMethod, agentID, caps); })); // This will persist this beyond the expiry of the caps handlers @@ -339,7 +334,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue } } - public Hashtable ProcessQueue(Hashtable request,UUID agentID, Caps caps) + public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps) { // TODO: this has to be redone to not busy-wait (and block the thread), // TODO: as soon as we have a non-blocking way to handle HTTP-requests. @@ -382,9 +377,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue responsedata["error_status_text"] = "Upstream error:"; responsedata["http_protocol_version"] = "HTTP/1.0"; return responsedata; - } - - + } OSDArray array = new OSDArray(); if (element == null) // didn't have an event in 15s @@ -416,7 +409,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue responsedata["content_type"] = "application/xml"; responsedata["keepalive"] = false; responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); - m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); + //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); return responsedata; } @@ -561,6 +554,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue { //return new LLSD(); } + return new OSDString("shutdown404!"); } } diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index 3f82190..88eabe1 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs @@ -144,22 +144,20 @@ namespace OpenSim.Region.Environment.Modules //m_log.Debug("[OFFSET]: " + hour + " - " + LindenHour + " - " + offsethours.ToString()); LindenHourOffset = (long)((float)offsethours * (36000000000/m_day_length)); - m_log.Info("[SUN]: Directive from the Estate Tools to set the sun phase to LindenHour " + GetLindenEstateHourFromCurrentTime().ToString()); + m_log.Debug("[SUN]: Directive from the Estate Tools to set the sun phase to LindenHour " + GetLindenEstateHourFromCurrentTime().ToString()); } // Called immediately after the module is loaded for a given region // i.e. Immediately after instance creation. public void Initialise(Scene scene, IConfigSource config) { - m_log.Debug("[SUN] Initializing"); - m_scene = scene; m_frame = 0; TimeZone local = TimeZone.CurrentTimeZone; TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; - m_log.Debug("[SUN] localtime offset is " + TicksOffset); + m_log.Debug("[SUN]: localtime offset is " + TicksOffset); // Align ticks with Second Life @@ -185,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules } catch (Exception e) { - m_log.Debug("[SUN] Configuration access failed, using defaults. Reason: "+e.Message); + m_log.Debug("[SUN]: Configuration access failed, using defaults. Reason: "+e.Message); m_mode = d_mode; m_year_length = d_year_length; m_day_length = d_day_length; @@ -231,10 +229,10 @@ namespace OpenSim.Region.Environment.Modules ready = true; - m_log.Debug("[SUN] Mode is "+m_mode); - m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); - m_log.Debug("[SUN] Axis offset is "+m_day_night); - m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames"); + m_log.Debug("[SUN]: Mode is "+m_mode); + m_log.Debug("[SUN]: Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); + m_log.Debug("[SUN]: Axis offset is "+m_day_night); + m_log.Debug("[SUN]: Positional data updated every "+m_frame_mod+" frames"); break; } @@ -276,7 +274,6 @@ namespace OpenSim.Region.Environment.Modules if (!sunFixed) GenSunPos(); // Generate shared values once client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); - m_log.Debug("[SUN] Initial update for new client"); } } } @@ -383,7 +380,6 @@ namespace OpenSim.Region.Environment.Modules if (m_rootAgents.ContainsKey(AgentId)) { m_rootAgents.Remove(AgentId); - m_log.Info("[SUN]: Removing " + AgentId + ". Agent logged out."); } } } diff --git a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs index 52eb6e7..6b06fbd 100644 --- a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs @@ -37,7 +37,6 @@ namespace OpenSim.Region.Environment.Modules { public class WindModule : IWindModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private int m_frame = 0; @@ -46,40 +45,14 @@ namespace OpenSim.Region.Environment.Modules private Scene m_scene = null; private bool ready = false; private Vector2[] windSpeeds = new Vector2[16 * 16]; - private Dictionary m_rootAgents = new Dictionary(); - - // Current time in elpased seconds since Jan 1st 1970 - - + public void Initialise(Scene scene, IConfigSource config) { - m_log.Debug("[WIND] Initializing"); - m_scene = scene; - m_frame = 0; - - - // Align ticks with Second Life - - - - // Just in case they don't have the stanzas - try - { - - } - catch (Exception e) - { - m_log.Debug("[WIND] Configuration access failed, using defaults. Reason: " + e.Message); - - } - - - scene.EventManager.OnFrame += WindUpdate; - + scene.EventManager.OnFrame += WindUpdate; scene.EventManager.OnMakeChildAgent += MakeChildAgent; scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; scene.EventManager.OnClientClosed += ClientLoggedOut; @@ -88,9 +61,6 @@ namespace OpenSim.Region.Environment.Modules GenWindPos(); ready = true; - - - } public void PostInitialise() @@ -125,13 +95,12 @@ namespace OpenSim.Region.Environment.Modules public void WindToClient(IClientAPI client) { - if (ready) - { - //if (!sunFixed) - //GenWindPos(); // Generate shared values once - client.SendWindData(windSpeeds); - m_log.Debug("[WIND] Initial update for new client"); - } + if (ready) + { + //if (!sunFixed) + //GenWindPos(); // Generate shared values once + client.SendWindData(windSpeeds); + } } public void WindUpdate() @@ -199,7 +168,6 @@ namespace OpenSim.Region.Environment.Modules if (m_rootAgents.ContainsKey(AgentId)) { m_rootAgents.Remove(AgentId); - m_log.Info("[WIND]: Removing " + AgentId + ". Agent logged out."); } } } diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index 6ce82ad..cf1900b 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs @@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); regionimage = regionimage.Replace("-", ""); - m_log.Warn("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); + m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage); m_scene.CommsManager.HttpServer.AddLLSDHandler( @@ -137,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap public void OnRegisterCaps(UUID agentID, Caps caps) { - m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); + //m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); string capsBase = "/CAPS/" + caps.CapsObjectPath; caps.RegisterHandler("MapLayer", new RestStreamHandler("POST", capsBase + m_mapLayerPath, @@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap { if (threadrunning) return; threadrunning = true; - m_log.Warn("[WORLD MAP]: Starting remote MapItem request thread"); + m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread"); mapItemReqThread = new Thread(new ThreadStart(process)); mapItemReqThread.IsBackground = true; mapItemReqThread.Name = "MapItemRequestThread"; @@ -419,7 +419,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } threadrunning = false; - m_log.Debug("[WORLD MAP]: Remote request thread exiting"); } /// @@ -557,7 +556,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap if (!m_blacklistedregions.ContainsKey(regionhandle)) m_blacklistedregions.Add(regionhandle, System.Environment.TickCount); } - m_log.WarnFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString()); + m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString()); } } @@ -606,7 +605,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } catch (WebException ex) { - m_log.InfoFormat("[WORLD MAP]: Bad send on GetMapItems {0}", ex.Message); + m_log.WarnFormat("[WORLD MAP]: Bad send on GetMapItems {0}", ex.Message); responseMap["connect"] = OSD.FromBoolean(false); lock (m_blacklistedurls) { @@ -716,7 +715,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap public Hashtable OnHTTPGetMapImage(Hashtable keysvals) { - m_log.Info("[WORLD MAP]: Sending map image jpeg"); + m_log.Debug("[WORLD MAP]: Sending map image jpeg"); Hashtable reply = new Hashtable(); int statuscode = 200; byte[] jpeg = new byte[0]; @@ -857,8 +856,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // You may ask, why this is in a threadpool to start with.. // The reason is so we don't cause the thread to freeze waiting // for the 1 second it costs to start a thread manually. - - m_log.Warn("[WORLD MAP]: MakeRootAgent Works!"); if (!threadrunning) ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread)); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 18afb86..3bf6cef 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2576,7 +2576,6 @@ namespace OpenSim.Region.Environment.Scenes if (avatar.Scene.NeedSceneCacheClear(avatar.UUID)) { - m_log.InfoFormat("[SCENE]: User {0} is going to another region, profile cache removed in {1}", avatar.UUID, RegionInfo.RegionName); CommsManager.UserProfileCacheService.RemoveUser(agentID); } @@ -2860,10 +2859,6 @@ namespace OpenSim.Region.Environment.Scenes String capsObjectPath = GetCapsPath(agentId); - m_log.DebugFormat( - "[CAPS]: Setting up CAPS handler for agent {0} in {1}", - agentId, RegionInfo.RegionName); - Caps cap = null; if (m_capsHandlers.TryGetValue(agentId, out cap)) { @@ -2908,7 +2903,6 @@ namespace OpenSim.Region.Environment.Scenes { if (childrenSeeds.ContainsKey(agentId)) { - //Console.WriteLine(" !!! Removing seeds for {0} in {1}", agentId, RegionInfo.RegionName); childrenSeeds.Remove(agentId); } @@ -2916,10 +2910,6 @@ namespace OpenSim.Region.Environment.Scenes { if (m_capsHandlers.ContainsKey(agentId)) { - m_log.DebugFormat( - "[CAPS]: Removing CAPS handler for root agent {0} in {1}", - agentId, RegionInfo.RegionName); - m_capsHandlers[agentId].DeregisterHandlers(); EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index ba8080c..7997fba 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -355,8 +355,6 @@ namespace OpenSim.Region.Environment.Scenes neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); - m_log.Debug("[SCM]: EnableChildAgents from " + avatar.Scene.RegionInfo.RegionName); - /// We need to find the difference between the new regions where there are no child agents /// and the regions where there are already child agents. We only send notification to the former. List neighbourHandles = NeighbourHandles(neighbours); // on this region diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 073457b..78e3a83 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -505,7 +505,6 @@ namespace OpenSim.Region.Environment.Scenes get { return m_knownChildRegions; } set { - //Console.WriteLine(" !! Setting known regions in {0} to {1}", Scene.RegionInfo.RegionName, value.Count); m_knownChildRegions = value; } } @@ -587,8 +586,6 @@ namespace OpenSim.Region.Environment.Scenes CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid); if (userInfo != null) userInfo.OnItemReceived += ItemReceived; - - m_log.Info("[AVATAR]: New ScenePresence in " + Scene.RegionInfo.RegionName); } public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams, @@ -803,7 +800,7 @@ namespace OpenSim.Region.Environment.Scenes "[SCENE]: Upgrading child to root agent for {0} in {1}", Name, m_scene.RegionInfo.RegionName); - m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); + //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); IGroupsModule gm = m_scene.RequestModuleInterface(); if (gm != null) @@ -2172,9 +2169,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// public void SendWearables() - { - m_log.DebugFormat("[APPEARANCE]: Sending wearables to {0}", Name); - + { ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); } @@ -2183,8 +2178,6 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendAppearanceToAllOtherAgents() { - m_log.DebugFormat("[APPEARANCE]: Sending appearance to all other agents for {0}", Name); - m_perfMonMS = System.Environment.TickCount; m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) @@ -2215,8 +2208,6 @@ namespace OpenSim.Region.Environment.Scenes /// public void SetAppearance(byte[] texture, List visualParam) { - m_log.DebugFormat("[APPEARANCE]: Receiving appearance for {0}", Name); - m_appearance.SetAppearance(texture, visualParam); SetHeight(m_appearance.AvatarHeight); m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); @@ -2232,8 +2223,6 @@ namespace OpenSim.Region.Environment.Scenes public void SetWearable(int wearableId, AvatarWearable wearable) { - m_log.DebugFormat("[APPEARANCE]: Setting wearable for {0}", Name); - m_appearance.SetWearable(wearableId, wearable); m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); @@ -2466,8 +2455,7 @@ namespace OpenSim.Region.Environment.Scenes IEventQueue eq = m_scene.RequestModuleInterface(); if (eq != null) - { - + { OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, capsPath, UUID, ControllingClient.SessionId); eq.Enqueue(Item, UUID); -- cgit v1.1