From e9901ecfda65d27a2882c1dfffc49be12e6db2ca Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 16 Jan 2015 00:51:37 +0000 Subject: [PATCH] minor: Suppress the log messages when user profiles data is requested for an NPC or an HG user with no set server URI to avoid log spam. Messages concerning failure to contact a given user profiles service are preserved by logging within called code with the agent ID. If the "No Presence - foreign friend" log message is important then please revert. Relates to http://opensimulator.org/mantis/view.php?id=7414 --- .../Avatar/UserProfiles/UserProfileModule.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 546a121c3b..48bb2df878 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs @@ -1059,7 +1059,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles if (!GetProfileData(ref props, foreign, out result)) { - m_log.DebugFormat("Error getting profile for {0}: {1}", avatarID, result); +// m_log.DebugFormat("Error getting profile for {0}: {1}", avatarID, result); return; } @@ -1155,7 +1155,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles } catch (Exception e) { - m_log.Debug(string.Format("Request using the OpenProfile API to {0} failed", serverURI), e); + m_log.Debug( + string.Format( + "[PROFILES]: Request using the OpenProfile API for user {0} to {1} failed", + properties.UserId, serverURI), + e); + // Allow the return 'message' to say "JsonRpcRequest" and not "OpenProfile", because // the most likely reason that OpenProfile failed is that the remote server // doesn't support OpenProfile, and that's not very interesting. @@ -1164,7 +1169,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles if (!secondChanceSuccess) { - message = string.Format("JsonRpcRequest to {0} failed", serverURI); + message = string.Format("JsonRpcRequest for user {0} to {1} failed", properties.UserId, serverURI); + m_log.DebugFormat("[PROFILES]: {0}", message); + return false; } // else, continue below