From bd05850be1ce0dcf45c37b5e7b7c53ace2682b2b Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 12 May 2007 15:32:04 +0000 Subject: 93 warnings in the compiler, 93 warnings appear, you fix one up, create two more, 94 warnings in the compiler... --- OpenSim.RegionServer/OpenSimMain.cs | 68 +++++++++++------------ OpenSim.RegionServer/RegionInfo.cs | 28 +++++----- OpenSim.RegionServer/SimClient.cs | 28 +++++----- OpenSim.RegionServer/world/Avatar.cs | 10 ++-- OpenSim.RegionServer/world/AvatarAnimations.cs | 2 +- OpenSim.RegionServer/world/World.cs | 62 ++++++++++----------- OpenSim.RegionServer/world/WorldPacketHandlers.cs | 2 +- 7 files changed, 100 insertions(+), 100 deletions(-) diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 8d89c6a..d522e2b 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -122,7 +122,7 @@ namespace OpenSim { this.SetupFromConfigFile(this.localConfig); } - m_console.WriteLine("Main.cs:Startup() - Loading configuration"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration"); this.regionData.InitConfig(this.m_sandbox, this.localConfig); this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change @@ -133,7 +133,7 @@ namespace OpenSim GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; - m_console.WriteLine("Starting in Sandbox mode"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Starting in Sandbox mode"); } else { @@ -147,7 +147,7 @@ namespace OpenSim } GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; - m_console.WriteLine("Starting in Grid mode"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Starting in Grid mode"); } try @@ -156,7 +156,7 @@ namespace OpenSim } catch (Exception e) { - m_console.WriteLine(e.Message + "\nSorry, could not setup the grid interface"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,e.Message + "\nSorry, could not setup the grid interface"); Environment.Exit(1); } @@ -169,7 +169,7 @@ namespace OpenSim } catch (Exception e) { - m_console.WriteLine(e.Message + "\nSorry, could not setup local cache"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,e.Message + "\nSorry, could not setup local cache"); Environment.Exit(1); } @@ -185,11 +185,11 @@ namespace OpenSim { if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort)) { - m_console.WriteLine("Main.cs:Startup() - Success: Got a grid connection OK!"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Success: Got a grid connection OK!"); } else { - m_console.WriteLine("Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down."); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down."); Shutdown(); } @@ -215,7 +215,7 @@ namespace OpenSim } catch (Exception e) { - m_console.WriteLine(e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!"); Environment.Exit(1); } } @@ -223,8 +223,8 @@ namespace OpenSim } - m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); - m_console.WriteLine("Initialising world"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Initialising world"); LocalWorld = new World(this._packetServer.ClientThreads, regionData.RegionHandle, regionData.RegionName); LocalWorld.InventoryCache = InventoryCache; LocalWorld.AssetCache = AssetCache; @@ -240,7 +240,7 @@ namespace OpenSim LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. LocalWorld.LoadWorldMap(); - m_console.WriteLine("Main.cs:Startup() - Starting up messaging system"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting up messaging system"); LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); @@ -252,7 +252,7 @@ namespace OpenSim AssetCache.LoadDefaultTextureSet(); } - m_console.WriteLine("Main.cs:Startup() - Initialising HTTP server"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Initialising HTTP server"); // HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort); BaseHttpServer httpServer = new BaseHttpServer(regionData.IPListenPort); @@ -351,12 +351,12 @@ namespace OpenSim AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); adminWebFront.LoadMethods(httpServer); - m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP server"); httpServer.Start(); if (gridServer.GetName() == "Remote") { - m_console.WriteLine("Main.cs:Startup() - Starting up OGS protocol server"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting up OGS protocol server"); OGSServer.Start(); } @@ -429,7 +429,7 @@ namespace OpenSim switch (attri) { default: - m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); Environment.Exit(1); break; @@ -498,8 +498,8 @@ namespace OpenSim } catch (Exception e) { - m_console.WriteLine(e.Message + "\nSorry, a fatal error occurred while trying to load the config DLL"); - m_console.WriteLine("Can not continue starting up"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,e.Message + "\nSorry, a fatal error occurred while trying to load the config DLL"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"Can not continue starting up"); Environment.Exit(1); return null; } @@ -551,7 +551,7 @@ namespace OpenSim XmlRpcResponse GridResp; foreach (Hashtable neighbour in ((RemoteGridBase)this.GridServers.GridServer).neighbours) { - m_console.WriteLine("http://" + neighbour["sim_ip"] + ":" + neighbour["sim_port"]); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"http://" + neighbour["sim_ip"] + ":" + neighbour["sim_port"]); SimParams = new Hashtable(); SimParams["session_id"] = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].SessionID.ToString(); SimParams["secure_session_id"] = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].SecureSessionID.ToString(); @@ -591,21 +591,21 @@ namespace OpenSim private void MainServerListener() { - m_console.WriteLine("Main.cs:MainServerListener() - New thread started"); - m_console.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + regionData.IPListenAddr + ":" + regionData.IPListenPort); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - New thread started"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - Opening UDP socket on " + regionData.IPListenAddr + ":" + regionData.IPListenPort); ServerIncoming = new IPEndPoint(IPAddress.Any, regionData.IPListenPort); Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); Server.Bind(ServerIncoming); - m_console.WriteLine("Main.cs:MainServerListener() - UDP socket bound, getting ready to listen"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - UDP socket bound, getting ready to listen"); ipeSender = new IPEndPoint(IPAddress.Any, 0); epSender = (EndPoint)ipeSender; ReceivedData = new AsyncCallback(this.OnReceivedData); Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); - m_console.WriteLine("Main.cs:MainServerListener() - Listening..."); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - Listening..."); } @@ -650,11 +650,11 @@ namespace OpenSim /// public virtual void Shutdown() { - m_console.WriteLine("Main.cs:Shutdown() - Closing all threads"); - m_console.WriteLine("Main.cs:Shutdown() - Killing listener thread"); - m_console.WriteLine("Main.cs:Shutdown() - Killing clients"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Closing all threads"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Killing listener thread"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Killing clients"); // IMPLEMENT THIS - m_console.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Closing console and terminating"); LocalWorld.Close(); GridServers.Close(); m_console.Close(); @@ -681,8 +681,8 @@ namespace OpenSim switch (command) { case "help": - m_console.WriteLine("show users - show info about connected users"); - m_console.WriteLine("shutdown - disconnect all clients and shutdown"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"show users - show info about connected users"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - disconnect all clients and shutdown"); break; case "show": @@ -693,7 +693,7 @@ namespace OpenSim string result = ""; if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result)) { - m_console.WriteLine(result); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,result); } break; @@ -702,7 +702,7 @@ namespace OpenSim break; default: - m_console.WriteLine("Unknown command"); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Unknown command"); break; } } @@ -716,18 +716,18 @@ namespace OpenSim switch (ShowWhat) { case "uptime": - m_console.WriteLine("OpenSim has been running since " + startuptime.ToString()); - m_console.WriteLine("That is " + (DateTime.Now - startuptime).ToString()); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"OpenSim has been running since " + startuptime.ToString()); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"That is " + (DateTime.Now - startuptime).ToString()); break; case "users": OpenSim.world.Avatar TempAv; - m_console.WriteLine(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) { if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") { TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID]; - m_console.WriteLine(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString())); + m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString())); } } break; diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index 759ee64..edab1e5 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs @@ -87,7 +87,7 @@ namespace OpenSim stIn.Close(); gridresp.Close(); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); } public void InitConfig(bool sandboxMode, IGenericConfig configData) @@ -241,21 +241,21 @@ namespace OpenSim } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString()); } - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sim settings loaded:"); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("UUID: " + this.SimUUID.ToStringHyphenated()); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Name: " + this.RegionName); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Region Handle: " + this.RegionHandle.ToString()); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sandbox Mode? " + isSandbox.ToString()); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Asset URL: " + this.AssetURL); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Asset key: " + this.AssetSendKey); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid URL: " + this.GridURL); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid key: " + this.GridSendKey); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Sim settings loaded:"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "UUID: " + this.SimUUID.ToStringHyphenated()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Name: " + this.RegionName); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Handle: " + this.RegionHandle.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sandbox Mode? " + isSandbox.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset URL: " + this.AssetURL); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset key: " + this.AssetSendKey); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid URL: " + this.GridURL); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid key: " + this.GridSendKey); } } } diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 856909c..76bf46e 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -110,7 +110,7 @@ namespace OpenSim m_child = child; m_regionData = regionDat; - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs - Started up new client thread to handle incoming request"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"OpenSimClient.cs - Started up new client thread to handle incoming request"); cirpack = initialcirpack; userEP = remoteEP; if (m_gridServer.GetName() == "Remote") @@ -169,7 +169,7 @@ namespace OpenSim neighbourx += 1; newpos.Y = 1; } - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]"); Hashtable SimParams; ArrayList SendParams; @@ -220,7 +220,7 @@ namespace OpenSim public void UpgradeClient() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:UpgradeClient() - upgrading child to full agent"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"SimClient.cs:UpgradeClient() - upgrading child to full agent"); this.m_child = false; this.m_world.RemoveViewerAgent(this); if (!this.m_sandboxMode) @@ -233,7 +233,7 @@ namespace OpenSim public void DowngradeClient() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:UpgradeClient() - changing full agent to child"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"SimClient.cs:UpgradeClient() - changing full agent to child"); this.m_child = true; this.m_world.RemoveViewerAgent(this); this.m_world.AddViewerAgent(this); @@ -398,7 +398,7 @@ namespace OpenSim m_world.AddNewPrim((ObjectAddPacket)Pack, this); break; case PacketType.ObjectLink: - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,Pack.ToString()); ObjectLinkPacket link = (ObjectLinkPacket)Pack; uint parentprimid = 0; OpenSim.world.Primitive parentprim = null; @@ -426,7 +426,7 @@ namespace OpenSim } break; case PacketType.ObjectScale: - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,Pack.ToString()); break; case PacketType.ObjectShape: ObjectShapePacket shape = (ObjectShapePacket)Pack; @@ -657,7 +657,7 @@ namespace OpenSim { if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Resending " + packet.Type.ToString() + " packet, " + + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Resending " + packet.Type.ToString() + " packet, " + (now - packet.TickCount) + "ms have passed"); packet.Header.Resent = true; @@ -676,7 +676,7 @@ namespace OpenSim if (PendingAcks.Count > 250) { // FIXME: Handle the odd case where we have too many pending ACKs queued up - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Too many ACKs queued up!"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Too many ACKs queued up!"); return; } @@ -799,7 +799,7 @@ namespace OpenSim } catch (Exception) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); ClientThread.Abort(); } @@ -860,7 +860,7 @@ namespace OpenSim protected virtual void ClientLoop() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:ClientLoop() - Entered loop"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"OpenSimClient.cs:ClientLoop() - Entered loop"); while (true) { QueItem nextPacket = PacketQueue.Dequeue(); @@ -879,7 +879,7 @@ namespace OpenSim protected virtual void InitNewClient() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); m_world.AddViewerAgent(this); world.Entity tempent = m_world.Entities[this.AgentID]; @@ -893,12 +893,12 @@ namespace OpenSim if (!sessionInfo.Authorised) { //session/circuit not authorised - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); ClientThread.Abort(); } else { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); //session is authorised this.AgentID = cirpack.CircuitCode.ID; this.SessionID = cirpack.CircuitCode.SessionID; @@ -947,7 +947,7 @@ namespace OpenSim protected virtual bool Logout(SimClient simClient, Packet packet) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got a logout request"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"OpenSimClient.cs:ProcessInPacket() - Got a logout request"); //send reply to let the client logout LogoutReplyPacket logReply = new LogoutReplyPacket(); logReply.AgentData.AgentID = this.AgentID; diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index abb43c6..f8a1a5a 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs @@ -45,7 +45,7 @@ namespace OpenSim.world m_regionTerraform = regionTerraform; m_regionWaterHeight = regionWater; - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs - Loading details from grid (DUMMY)"); ControllingClient = TheClient; localid = 8880000 + (this.m_world._localNumber++); Pos = ControllingClient.startpos; @@ -168,7 +168,7 @@ namespace OpenSim.world public void CompleteMovement(World RegionInfo) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); mov.AgentData.SessionID = this.ControllingClient.SessionID; mov.AgentData.AgentID = this.ControllingClient.AgentID; @@ -334,11 +334,11 @@ namespace OpenSim.world //really really should be moved somewhere else (RegionInfo.cs ?) public void SendRegionHandshake(World RegionInfo) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); System.Text.Encoding _enc = System.Text.Encoding.ASCII; RegionHandshakePacket handshake = new RegionHandshakePacket(); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); handshake.RegionInfo.BillableFactor = 0; handshake.RegionInfo.IsEstateManager = false; handshake.RegionInfo.TerrainHeightRange00 = 60; @@ -369,7 +369,7 @@ namespace OpenSim.world handshake.RegionInfo.TerrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37"); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); this.ControllingClient.OutPacket(handshake); } diff --git a/OpenSim.RegionServer/world/AvatarAnimations.cs b/OpenSim.RegionServer/world/AvatarAnimations.cs index 36c4c7e..b554af8 100644 --- a/OpenSim.RegionServer/world/AvatarAnimations.cs +++ b/OpenSim.RegionServer/world/AvatarAnimations.cs @@ -17,7 +17,7 @@ namespace OpenSim.world public void LoadAnims() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:LoadAnims() - Loading avatar animations"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations"); AnimsLLUUID.Add("ANIM_AGENT_AFRAID", new LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca")); AnimsLLUUID.Add("ANIM_AGENT_AIM_BAZOOKA_R", new LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef")); AnimsLLUUID.Add("ANIM_AGENT_AIM_BOW_L", new LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506")); diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 0ae4ae2..225ce81 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -64,12 +64,12 @@ namespace OpenSim.world m_scriptHandlers = new Dictionary(); m_scripts = new Dictionary(); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating new entitities instance"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs - creating new entitities instance"); Entities = new Dictionary(); Avatars = new Dictionary(); Prims = new Dictionary(); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs - creating LandMap"); TerrainManager = new TerrainManager(new SecondLife()); Terrain = new TerrainEngine(); Avatar.SetupTemplate("avatar-texture.dat"); @@ -82,7 +82,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Constructor failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"World.cs: Constructor failed with exception " + e.ToString()); } } @@ -100,7 +100,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: AddScript() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddScript() - Failed with exception " + e.ToString()); } } @@ -152,7 +152,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: AddScript() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddScript() - Failed with exception " + e.ToString()); } } @@ -230,7 +230,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Update() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: Update() - Failed with exception " + e.ToString()); } updateLock.ReleaseMutex(); } @@ -274,7 +274,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); return false; } } @@ -308,7 +308,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); } } @@ -339,7 +339,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); } } @@ -369,7 +369,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); } } @@ -397,7 +397,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); } } @@ -408,12 +408,12 @@ namespace OpenSim.world { try { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: LoadPrimsFromStorage() - Loading primitives"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: LoadPrimsFromStorage() - Loading primitives"); this.localStorage.LoadPrimitives(this); } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); } } @@ -429,14 +429,14 @@ namespace OpenSim.world { _primCount = prim.LocalID + 1; } - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage"); Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); nPrim.CreateFromStorage(prim); this.Entities.Add(nPrim.uuid, nPrim); } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: PrimFromStorage() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: PrimFromStorage() - Failed with exception " + e.ToString()); } } @@ -451,7 +451,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Close() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"World.cs: Close() - Failed with exception " + e.ToString()); } } @@ -481,7 +481,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: SendLayerData() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: SendLayerData() - Failed with exception " + e.ToString()); } } @@ -514,7 +514,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: SendLayerData() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: SendLayerData() - Failed with exception " + e.ToString()); } } @@ -537,7 +537,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: GetInitialPrims() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: GetInitialPrims() - Failed with exception " + e.ToString()); } } @@ -545,10 +545,10 @@ namespace OpenSim.world { try { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); Avatar newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs:AddViewerAgent() - Adding new avatar to world"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs:AddViewerAgent() - Starting RegionHandshake "); newAvatar.SendRegionHandshake(this); if (!agentClient.m_child) { @@ -569,7 +569,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); } } @@ -588,7 +588,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString()); } } @@ -596,7 +596,7 @@ namespace OpenSim.world { try { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: AddNewPrim() - Creating new prim"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: AddNewPrim() - Creating new prim"); Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this); prim.CreateFromPacket(addPacket, AgentClient.AgentID, this._primCount); PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z); @@ -614,7 +614,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: AddNewPrim() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddNewPrim() - Failed with exception " + e.ToString()); } } @@ -626,14 +626,14 @@ namespace OpenSim.world if (Terrain.tainted > 0) { Terrain.tainted = 0; - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Terrain tainted, saving."); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: Backup() - Terrain tainted, saving."); localStorage.SaveMap(Terrain.getHeights1D()); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Terrain saved, informing Physics."); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: Backup() - Terrain saved, informing Physics."); phyScene.SetTerrain(Terrain.getHeights1D()); } // Primitive backup routines - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Backing up Primitives"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: Backup() - Backing up Primitives"); foreach (libsecondlife.LLUUID UUID in Entities.Keys) { Entities[UUID].BackUp(); @@ -645,7 +645,7 @@ namespace OpenSim.world catch (Exception e) { // Backup failed - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Backup Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"World.cs: Backup() - Backup Failed with exception " + e.ToString()); return false; } } @@ -661,7 +661,7 @@ namespace OpenSim.world } catch (Exception e) { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: SetDefaultScripts() - Failed with exception " + e.ToString()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: SetDefaultScripts() - Failed with exception " + e.ToString()); } } diff --git a/OpenSim.RegionServer/world/WorldPacketHandlers.cs b/OpenSim.RegionServer/world/WorldPacketHandlers.cs index f4213d0..9e1f9a1 100644 --- a/OpenSim.RegionServer/world/WorldPacketHandlers.cs +++ b/OpenSim.RegionServer/world/WorldPacketHandlers.cs @@ -147,7 +147,7 @@ namespace OpenSim.world //Uncomment when prim/object UUIDs are random or such //2007-03-22 - Randomskk //this._primCount--; - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Deleted UUID " + ent.uuid); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Deleted UUID " + ent.uuid); } } } -- cgit v1.1