diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 655abd7970..93117fd887 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -165,12 +165,13 @@ namespace OpenSim.Framework.Communications else { m_inventoryService.CreateNewUserInventory(userProf.UUID); - System.Console.WriteLine("[USERS]: Created new inventory set for " + firstName + " " + lastName); + m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); return userProf.UUID; } } #region Friend Methods + /// /// Adds a new friend to the database for XUser /// @@ -181,6 +182,7 @@ namespace OpenSim.Framework.Communications { m_userService.AddNewUserFriend(friendlistowner, friend, perms); } + /// /// Logs off a user and does the appropriate communications /// @@ -216,6 +218,7 @@ namespace OpenSim.Framework.Communications { m_userService.UpdateUserFriendPerms(friendlistowner, friend, perms); } + /// /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner /// diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index f9d24e554c..311a9c98cd 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -42,8 +42,10 @@ namespace OpenSim.Grid.UserServer public class UserManager : UserManagerBase { private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + public event logOffUser OnLogOffUser; private logOffUser handlerLogOffUser = null; + /// /// Deletes an active agent session /// @@ -168,7 +170,7 @@ namespace OpenSim.Grid.UserServer returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]); } - Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string) requestData["avquery"]); + m_log.InfoFormat("[AVATARINFO]: Servicing Avatar Query: " + (string) requestData["avquery"]); return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar); } diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 0a17b2fb8c..d53201fa30 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -51,13 +51,13 @@ namespace OpenSim.Region.ClientStack /// public class ClientView : IClientAPI { + private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + // ~ClientView() // { - // System.Console.WriteLine("[CLIENTVIEW]: Destructor called"); + // m_log.Info("[CLIENTVIEW]: Destructor called"); // } - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - /* static variables */ public static TerrainManager TerrainManager; @@ -1820,7 +1820,7 @@ namespace OpenSim.Region.ClientStack public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) { ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); - System.Console.WriteLine("Attach object!"); + Console.WriteLine("Attach object!"); // TODO: don't create new blocks if recycling an old packet attach.AgentData.AgentID = AgentId; attach.AgentData.SessionID = m_sessionId; @@ -2340,7 +2340,7 @@ namespace OpenSim.Region.ClientStack /// protected bool AgentTextureCached(IClientAPI simclient, Packet packet) { - //System.Console.WriteLine("texture cached: " + packet.ToString()); + //Console.WriteLine("texture cached: " + packet.ToString()); AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet; AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse); // TODO: don't create new blocks if recycling an old packet @@ -2368,7 +2368,7 @@ namespace OpenSim.Region.ClientStack protected bool MultipleObjUpdate(IClientAPI simClient, Packet packet) { MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; - // System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); + // Console.WriteLine("new multi update packet " + multipleupdate.ToString()); Scene tScene = (Scene)m_scene; for (int i = 0; i < multipleupdate.ObjectData.Length; i++) @@ -2407,7 +2407,7 @@ namespace OpenSim.Region.ClientStack if (handlerUpdatePrimSinglePosition != null) { - // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); + // Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); handlerUpdatePrimSinglePosition(localId, pos1, this); } break; @@ -2418,7 +2418,7 @@ namespace OpenSim.Region.ClientStack if (handlerUpdatePrimSingleRotation != null) { - //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); + //Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); handlerUpdatePrimSingleRotation(localId, rot1, this); } break; @@ -2429,7 +2429,7 @@ namespace OpenSim.Region.ClientStack if (handlerUpdatePrimSingleRotation != null) { - //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); + //Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); handlerUpdatePrimSingleRotation(localId, rot2, this); } break; @@ -2496,7 +2496,7 @@ namespace OpenSim.Region.ClientStack // Change the position based on scale (for bug number 246) handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; - // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); + // Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); if (handlerUpdatePrimSinglePosition != null) { handlerUpdatePrimSinglePosition(localId, pos4, this); @@ -3311,7 +3311,7 @@ namespace OpenSim.Region.ClientStack AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; - //System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); + //Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); handlerAvatarPickerRequest = OnAvatarPickerRequest; if (handlerAvatarPickerRequest != null) @@ -4201,7 +4201,7 @@ namespace OpenSim.Region.ClientStack } break; case PacketType.ParcelObjectOwnersRequest: - //System.Console.WriteLine(Pack.ToString()); + //Console.WriteLine(Pack.ToString()); ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; handlerParcelObjectOwnerRequest = OnParcelObjectOwnerRequest; diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index f602e37416..ea13b1be37 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -328,7 +328,7 @@ namespace OpenSim.Region.Communications.OGS1 if (responseData.ContainsKey("error")) { - Console.WriteLine("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); + m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); return null; } @@ -588,7 +588,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); } remObject = null; //m_log.Info("[INTER]: " + @@ -699,7 +699,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("[OGS1 GRID SERVICES]: remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); } remObject = null; m_log.Info("[OGS1 GRID SERVICES]: " + @@ -812,7 +812,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); } remObject = null; m_log.Info("[INTER]: " + gdebugRegionName + ": OGS1 tried to inform region I'm up"); @@ -924,7 +924,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("[OGS1 GRID SERVICES]: Remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: Remoting object not found"); } remObject = null; @@ -1010,7 +1010,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("[OGS1 GRID SERVICES]: Remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: Remoting object not found"); } remObject = null; @@ -1066,7 +1066,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("[OGS1 GRID SERVICES]: Remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: Remoting object not found"); } remObject = null; @@ -1140,7 +1140,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - Console.WriteLine("[OGS1 GRID SERVICES]: Remoting object not found"); + m_log.Warn("[OGS1 GRID SERVICES]: Remoting object not found"); } remObject = null;