From 6ed5283bc06a62f38eb517e67b975832b603bf61 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 5 Feb 2008 19:44:27 +0000 Subject: Converted logging to use log4net. Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done. --- OpenSim/Grid/UserServer/UserManager.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'OpenSim/Grid/UserServer/UserManager.cs') diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index c36de7f..8f2d83c 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -39,6 +39,8 @@ namespace OpenSim.Grid.UserServer { public class UserManager : UserManagerBase { + private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + /// /// Deletes an active agent session /// @@ -106,6 +108,7 @@ namespace OpenSim.Grid.UserServer return response; } + /// /// Converts a user profile to an XML element which can be returned /// @@ -202,7 +205,6 @@ namespace OpenSim.Grid.UserServer responseData["returnString"] = returnString; response.Value = responseData; return response; - } public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) @@ -212,8 +214,6 @@ namespace OpenSim.Grid.UserServer Hashtable responseData = new Hashtable(); string returnString = "FALSE"; - - if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) { UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); @@ -233,8 +233,6 @@ namespace OpenSim.Grid.UserServer List returndata = new List(); - - if (requestData.Contains("ownerID")) { returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); @@ -309,7 +307,6 @@ namespace OpenSim.Grid.UserServer return CreateUnknownUserErrorResponse(); } - return ProfileToXmlRPCResponse(userProfile); } @@ -318,7 +315,6 @@ namespace OpenSim.Grid.UserServer XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; - UserProfileData userProfile; if (requestData.Contains("avatar_uuid")) @@ -336,17 +332,15 @@ namespace OpenSim.Grid.UserServer } catch (FormatException) { - OpenSim.Framework.Console.MainLog.Instance.Warn("LOGOUT", "Error in Logout XMLRPC Params"); + m_log.Warn("[LOGOUT]: Error in Logout XMLRPC Params"); return response; } - } else { return CreateUnknownUserErrorResponse(); } - return response; } -- cgit v1.1