aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r--OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs5
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.Grid.cs7
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs3
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs5
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.cs19
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientViewBase.cs7
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSimMain.cs50
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionInfo.cs28
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs6
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.cs10
-rw-r--r--OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs4
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.cs61
-rw-r--r--OpenSim/OpenSim.RegionServer/world/WorldBase.cs5
14 files changed, 110 insertions, 102 deletions
diff --git a/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs b/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs
index f66fa80..b98eac9 100644
--- a/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs
+++ b/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs
@@ -34,6 +34,7 @@ using OpenSim;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Utilities; 36using OpenSim.Framework.Utilities;
37using OpenSim.Framework.Console;
37 38
38namespace OpenSim.Assets 39namespace OpenSim.Assets
39{ 40{
@@ -60,7 +61,7 @@ namespace OpenSim.Assets
60 /// </summary> 61 /// </summary>
61 public AssetCache(IAssetServer assetServer) 62 public AssetCache(IAssetServer assetServer)
62 { 63 {
63 Console.WriteLine("Creating Asset cache"); 64 MainConsole.Instance.Verbose("Creating Asset cache");
64 _assetServer = assetServer; 65 _assetServer = assetServer;
65 _assetServer.SetReceiver(this); 66 _assetServer.SetReceiver(this);
66 Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>(); 67 Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>();
@@ -86,7 +87,7 @@ namespace OpenSim.Assets
86 } 87 }
87 catch (Exception e) 88 catch (Exception e)
88 { 89 {
89 Console.WriteLine(e.Message); 90 MainConsole.Instance.Error(e.Message);
90 } 91 }
91 } 92 }
92 } 93 }
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs b/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs
index 5229dbd..e59229a 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs
@@ -15,6 +15,7 @@ using OpenSim.Framework.Inventory;
15using OpenSim.Framework.Utilities; 15using OpenSim.Framework.Utilities;
16using OpenSim.world; 16using OpenSim.world;
17using OpenSim.Assets; 17using OpenSim.Assets;
18using OpenSim.Framework.Console;
18 19
19namespace OpenSim 20namespace OpenSim
20{ 21{
@@ -42,7 +43,7 @@ namespace OpenSim
42 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]); 43 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]);
43 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString(); 44 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString();
44 45
45 Console.WriteLine(reqUrl); 46 MainConsole.Instance.Verbose("Requesting " + reqUrl);
46 47
47 SimParams = new Hashtable(); 48 SimParams = new Hashtable();
48 SimParams["session_id"] = this.SessionID.ToString(); 49 SimParams["session_id"] = this.SessionID.ToString();
@@ -72,7 +73,7 @@ namespace OpenSim
72 } 73 }
73 catch (Exception e) 74 catch (Exception e)
74 { 75 {
75 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Could not connect to neighbour " + neighbour["sim_ip"] + ":" + neighbour["sim_port"] + ", continuing."); 76 MainConsole.Instance.Notice("Could not connect to neighbour " + neighbour["sim_ip"] + ":" + neighbour["sim_port"] + ", continuing.");
76 } 77 }
77 } 78 }
78 Thread.Sleep(3000); 79 Thread.Sleep(3000);
@@ -112,7 +113,7 @@ namespace OpenSim
112 neighboury += 1; 113 neighboury += 1;
113 newpos.Y = 1; 114 newpos.Y = 1;
114 } 115 }
115 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]"); 116 MainConsole.Instance.Notice("SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]");
116 117
117 Hashtable SimParams; 118 Hashtable SimParams;
118 ArrayList SendParams; 119 ArrayList SendParams;
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
index 7928817..f21efaf 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
@@ -15,6 +15,7 @@ using OpenSim.Framework.Inventory;
15using OpenSim.Framework.Utilities; 15using OpenSim.Framework.Utilities;
16using OpenSim.world; 16using OpenSim.world;
17using OpenSim.Assets; 17using OpenSim.Assets;
18using OpenSim.Framework.Console;
18 19
19namespace OpenSim 20namespace OpenSim
20{ 21{
@@ -29,7 +30,7 @@ namespace OpenSim
29 30
30 protected virtual bool Logout(ClientView simClient, Packet packet) 31 protected virtual bool Logout(ClientView simClient, Packet packet)
31 { 32 {
32 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); 33 MainConsole.Instance.Notice("OpenSimClient.cs:ProcessInPacket() - Got a logout request");
33 //send reply to let the client logout 34 //send reply to let the client logout
34 LogoutReplyPacket logReply = new LogoutReplyPacket(); 35 LogoutReplyPacket logReply = new LogoutReplyPacket();
35 logReply.AgentData.AgentID = this.AgentID; 36 logReply.AgentData.AgentID = this.AgentID;
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index 19d222c..7cb2727 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -16,6 +16,7 @@ using OpenSim.Framework.Utilities;
16using OpenSim.world; 16using OpenSim.world;
17using OpenSim.RegionServer.world; 17using OpenSim.RegionServer.world;
18using OpenSim.Assets; 18using OpenSim.Assets;
19using OpenSim.Framework.Console;
19 20
20namespace OpenSim 21namespace OpenSim
21{ 22{
@@ -464,7 +465,7 @@ namespace OpenSim
464 outgoing.MoneyData.TransactionSuccess = true; 465 outgoing.MoneyData.TransactionSuccess = true;
465 outgoing.MoneyData.Description = libsecondlife.Helpers.StringToField(""); 466 outgoing.MoneyData.Description = libsecondlife.Helpers.StringToField("");
466 this.OutPacket((Packet)outgoing); 467 this.OutPacket((Packet)outgoing);
467 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sent Temporary Money packet (they have leet monies)"); 468 MainConsole.Instance.Notice("Sent Temporary Money packet (they have leet monies)");
468 469
469 break; 470 break;
470 471
@@ -477,7 +478,7 @@ namespace OpenSim
477 estateCovenantReply.Data.CovenantID = LLUUID.Zero; 478 estateCovenantReply.Data.CovenantID = LLUUID.Zero;
478 estateCovenantReply.Data.CovenantTimestamp = (uint)0; 479 estateCovenantReply.Data.CovenantTimestamp = (uint)0;
479 this.OutPacket((Packet)estateCovenantReply); 480 this.OutPacket((Packet)estateCovenantReply);
480 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sent Temporary Estate packet (they are in leet estate)"); 481 MainConsole.Instance.Notice("Sent Temporary Estate packet (they are in leet estate)");
481 break; 482 break;
482 #endregion 483 #endregion
483 } 484 }
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs
index 8f7cf58..bf6b72e 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.cs
@@ -41,6 +41,7 @@ using OpenSim.Framework.Inventory;
41using OpenSim.Framework.Utilities; 41using OpenSim.Framework.Utilities;
42using OpenSim.world; 42using OpenSim.world;
43using OpenSim.Assets; 43using OpenSim.Assets;
44using OpenSim.Framework.Console;
44 45
45namespace OpenSim 46namespace OpenSim
46{ 47{
@@ -110,7 +111,7 @@ namespace OpenSim
110 m_child = child; 111 m_child = child;
111 m_regionData = regionDat; 112 m_regionData = regionDat;
112 m_authenticateSessionsHandler = authenSessions; 113 m_authenticateSessionsHandler = authenSessions;
113 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs - Started up new client thread to handle incoming request"); 114 MainConsole.Instance.Notice("OpenSimClient.cs - Started up new client thread to handle incoming request");
114 cirpack = initialcirpack; 115 cirpack = initialcirpack;
115 userEP = remoteEP; 116 userEP = remoteEP;
116 117
@@ -150,7 +151,7 @@ namespace OpenSim
150 # region Client Methods 151 # region Client Methods
151 public void UpgradeClient() 152 public void UpgradeClient()
152 { 153 {
153 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent"); 154 MainConsole.Instance.Notice("SimClient.cs:UpgradeClient() - upgrading child to full agent");
154 this.m_child = false; 155 this.m_child = false;
155 //this.m_world.RemoveViewerAgent(this); 156 //this.m_world.RemoveViewerAgent(this);
156 if (!this.m_sandboxMode) 157 if (!this.m_sandboxMode)
@@ -164,7 +165,7 @@ namespace OpenSim
164 165
165 public void DowngradeClient() 166 public void DowngradeClient()
166 { 167 {
167 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - changing full agent to child"); 168 MainConsole.Instance.Notice("SimClient.cs:UpgradeClient() - changing full agent to child");
168 this.m_child = true; 169 this.m_child = true;
169 OnChildAgentStatus(this.m_child); 170 OnChildAgentStatus(this.m_child);
170 //this.m_world.RemoveViewerAgent(this); 171 //this.m_world.RemoveViewerAgent(this);
@@ -254,7 +255,7 @@ namespace OpenSim
254 255
255 protected virtual void ClientLoop() 256 protected virtual void ClientLoop()
256 { 257 {
257 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ClientLoop() - Entered loop"); 258 MainConsole.Instance.Notice("OpenSimClient.cs:ClientLoop() - Entered loop");
258 while (true) 259 while (true)
259 { 260 {
260 QueItem nextPacket = PacketQueue.Dequeue(); 261 QueItem nextPacket = PacketQueue.Dequeue();
@@ -276,7 +277,7 @@ namespace OpenSim
276 277
277 protected virtual void InitNewClient() 278 protected virtual void InitNewClient()
278 { 279 {
279 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); 280 MainConsole.Instance.Notice("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
280 this.ClientAvatar = m_world.AddViewerAgent(this); 281 this.ClientAvatar = m_world.AddViewerAgent(this);
281 } 282 }
282 283
@@ -287,12 +288,12 @@ namespace OpenSim
287 if (!sessionInfo.Authorised) 288 if (!sessionInfo.Authorised)
288 { 289 {
289 //session/circuit not authorised 290 //session/circuit not authorised
290 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); 291 OpenSim.Framework.Console.MainConsole.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
291 ClientThread.Abort(); 292 ClientThread.Abort();
292 } 293 }
293 else 294 else
294 { 295 {
295 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); 296 OpenSim.Framework.Console.MainConsole.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
296 //session is authorised 297 //session is authorised
297 this.AgentID = cirpack.CircuitCode.ID; 298 this.AgentID = cirpack.CircuitCode.ID;
298 this.SessionID = cirpack.CircuitCode.SessionID; 299 this.SessionID = cirpack.CircuitCode.SessionID;
@@ -396,7 +397,7 @@ namespace OpenSim
396 if (this.m_userServer != null) 397 if (this.m_userServer != null)
397 { 398 {
398 // a user server is set so request the inventory from it 399 // a user server is set so request the inventory from it
399 Console.WriteLine("getting inventory from user server"); 400 MainConsole.Instance.Verbose("getting inventory from user server");
400 inventory = m_inventoryCache.FetchAgentsInventory(this.AgentID, m_userServer); 401 inventory = m_inventoryCache.FetchAgentsInventory(this.AgentID, m_userServer);
401 } 402 }
402 else 403 else
@@ -414,7 +415,7 @@ namespace OpenSim
414 { 415 {
415 if (!(packet.InventoryBlock.Type == 3 || packet.InventoryBlock.Type == 7)) 416 if (!(packet.InventoryBlock.Type == 3 || packet.InventoryBlock.Type == 7))
416 { 417 {
417 System.Console.WriteLine("Attempted to create " + Util.FieldToString(packet.InventoryBlock.Name) + " in inventory. Unsupported type"); 418 MainConsole.Instance.Warn("Attempted to create " + Util.FieldToString(packet.InventoryBlock.Name) + " in inventory. Unsupported type");
418 return; 419 return;
419 } 420 }
420 421
diff --git a/OpenSim/OpenSim.RegionServer/ClientViewBase.cs b/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
index 642251c..1eee329 100644
--- a/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
@@ -10,6 +10,7 @@ using System.Threading;
10using System.Timers; 10using System.Timers;
11using OpenSim.Framework.Utilities; 11using OpenSim.Framework.Utilities;
12using OpenSim.Framework.Interfaces; 12using OpenSim.Framework.Interfaces;
13using OpenSim.Framework.Console;
13 14
14namespace OpenSim 15namespace OpenSim
15{ 16{
@@ -132,7 +133,7 @@ namespace OpenSim
132 } 133 }
133 catch (Exception) 134 catch (Exception)
134 { 135 {
135 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); 136 MainConsole.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
136 this.KillThread(); 137 this.KillThread();
137 } 138 }
138 139
@@ -227,7 +228,7 @@ namespace OpenSim
227 { 228 {
228 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) 229 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
229 { 230 {
230 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Resending " + packet.Type.ToString() + " packet, " + 231 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Resending " + packet.Type.ToString() + " packet, " +
231 (now - packet.TickCount) + "ms have passed"); 232 (now - packet.TickCount) + "ms have passed");
232 233
233 packet.Header.Resent = true; 234 packet.Header.Resent = true;
@@ -246,7 +247,7 @@ namespace OpenSim
246 if (PendingAcks.Count > 250) 247 if (PendingAcks.Count > 250)
247 { 248 {
248 // FIXME: Handle the odd case where we have too many pending ACKs queued up 249 // FIXME: Handle the odd case where we have too many pending ACKs queued up
249 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Too many ACKs queued up!"); 250 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Too many ACKs queued up!");
250 return; 251 return;
251 } 252 }
252 253
diff --git a/OpenSim/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim/OpenSim.RegionServer/OpenSimMain.cs
index 003412d..59d3424 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim/OpenSim.RegionServer/OpenSimMain.cs
@@ -89,7 +89,7 @@ namespace OpenSim
89 { 89 {
90 this.SetupFromConfigFile(this.localConfig); 90 this.SetupFromConfigFile(this.localConfig);
91 } 91 }
92 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Loading configuration"); 92 m_console.Notice("Main.cs:Startup() - Loading configuration");
93 this.regionData.InitConfig(this.m_sandbox, this.localConfig); 93 this.regionData.InitConfig(this.m_sandbox, this.localConfig);
94 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change 94 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
95 95
@@ -118,7 +118,7 @@ namespace OpenSim
118 } 118 }
119 catch (Exception e) 119 catch (Exception e)
120 { 120 {
121 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, e.Message + "\nSorry, could not setup local cache"); 121 m_console.Error(e.Message + "\nSorry, could not setup local cache");
122 Environment.Exit(1); 122 Environment.Exit(1);
123 } 123 }
124 124
@@ -141,7 +141,7 @@ namespace OpenSim
141 AssetCache.LoadDefaultTextureSet(); 141 AssetCache.LoadDefaultTextureSet();
142 } 142 }
143 143
144 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Initialising HTTP server"); 144 m_console.Notice("Main.cs:Startup() - Initialising HTTP server");
145 145
146 this.SetupHttpListener(); 146 this.SetupHttpListener();
147 147
@@ -173,7 +173,7 @@ namespace OpenSim
173 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); 173 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
174 adminWebFront.LoadMethods(httpServer); 174 adminWebFront.LoadMethods(httpServer);
175 175
176 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting HTTP server"); 176 m_console.Notice("Main.cs:Startup() - Starting HTTP server");
177 httpServer.Start(); 177 httpServer.Start();
178 178
179 //MainServerListener(); 179 //MainServerListener();
@@ -190,7 +190,7 @@ namespace OpenSim
190 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; 190 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
191 GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; 191 GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll";
192 192
193 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Starting in Sandbox mode"); 193 m_console.Notice("Starting in Sandbox mode");
194 194
195 try 195 try
196 { 196 {
@@ -198,7 +198,7 @@ namespace OpenSim
198 } 198 }
199 catch (Exception e) 199 catch (Exception e)
200 { 200 {
201 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, e.Message + "\nSorry, could not setup the grid interface"); 201 m_console.Error(e.Message + "\nSorry, could not setup the grid interface");
202 Environment.Exit(1); 202 Environment.Exit(1);
203 } 203 }
204 } 204 }
@@ -215,7 +215,7 @@ namespace OpenSim
215 } 215 }
216 GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; 216 GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll";
217 217
218 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Starting in Grid mode"); 218 m_console.Notice("Starting in Grid mode");
219 219
220 try 220 try
221 { 221 {
@@ -223,15 +223,15 @@ namespace OpenSim
223 } 223 }
224 catch (Exception e) 224 catch (Exception e)
225 { 225 {
226 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, e.Message + "\nSorry, could not setup the grid interface"); 226 m_console.Error(e.Message + "\nSorry, could not setup the grid interface");
227 Environment.Exit(1); 227 Environment.Exit(1);
228 } 228 }
229 } 229 }
230 230
231 protected virtual void SetupLocalWorld() 231 protected virtual void SetupLocalWorld()
232 { 232 {
233 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); 233 m_console.Notice("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
234 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Initialising world"); 234 m_console.Notice("Initialising world");
235 m_console.componentname = "Region " + regionData.RegionName; 235 m_console.componentname = "Region " + regionData.RegionName;
236 236
237 m_localWorld = new World(this.m_udpServer.PacketServer.ClientThreads, regionData, regionData.RegionHandle, regionData.RegionName); 237 m_localWorld = new World(this.m_udpServer.PacketServer.ClientThreads, regionData, regionData.RegionHandle, regionData.RegionName);
@@ -249,7 +249,7 @@ namespace OpenSim
249 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. 249 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
250 LocalWorld.LoadWorldMap(); 250 LocalWorld.LoadWorldMap();
251 251
252 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting up messaging system"); 252 m_console.Notice("Main.cs:Startup() - Starting up messaging system");
253 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); 253 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
254 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); 254 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
255 LocalWorld.LoadPrimsFromStorage(); 255 LocalWorld.LoadPrimsFromStorage();
@@ -297,7 +297,7 @@ namespace OpenSim
297 { 297 {
298 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort)) 298 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort))
299 { 299 {
300 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Success: Got a grid connection OK!"); 300 m_console.Notice("Main.cs:Startup() - Success: Got a grid connection OK!");
301 } 301 }
302 else 302 else
303 { 303 {
@@ -397,7 +397,7 @@ namespace OpenSim
397 switch (attri) 397 switch (attri)
398 { 398 {
399 default: 399 default:
400 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); 400 m_console.Warn("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
401 Environment.Exit(1); 401 Environment.Exit(1);
402 break; 402 break;
403 403
@@ -440,11 +440,11 @@ namespace OpenSim
440 /// </summary> 440 /// </summary>
441 public virtual void Shutdown() 441 public virtual void Shutdown()
442 { 442 {
443 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Closing all threads"); 443 m_console.Notice("Main.cs:Shutdown() - Closing all threads");
444 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Killing listener thread"); 444 m_console.Notice("Main.cs:Shutdown() - Killing listener thread");
445 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Killing clients"); 445 m_console.Notice("Main.cs:Shutdown() - Killing clients");
446 // IMPLEMENT THIS 446 // IMPLEMENT THIS
447 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Closing console and terminating"); 447 m_console.Notice("Main.cs:Shutdown() - Closing console and terminating");
448 LocalWorld.Close(); 448 LocalWorld.Close();
449 GridServers.Close(); 449 GridServers.Close();
450 m_console.Close(); 450 m_console.Close();
@@ -472,8 +472,8 @@ namespace OpenSim
472 switch (command) 472 switch (command)
473 { 473 {
474 case "help": 474 case "help":
475 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "show users - show info about connected users"); 475 m_console.Error("show users - show info about connected users");
476 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "shutdown - disconnect all clients and shutdown"); 476 m_console.Error("shutdown - disconnect all clients and shutdown");
477 break; 477 break;
478 478
479 case "show": 479 case "show":
@@ -484,7 +484,7 @@ namespace OpenSim
484 string result = ""; 484 string result = "";
485 if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result)) 485 if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result))
486 { 486 {
487 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, result); 487 m_console.Error(result);
488 } 488 }
489 break; 489 break;
490 490
@@ -493,7 +493,7 @@ namespace OpenSim
493 break; 493 break;
494 494
495 default: 495 default:
496 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "Unknown command"); 496 m_console.Error("Unknown command");
497 break; 497 break;
498 } 498 }
499 } 499 }
@@ -507,18 +507,18 @@ namespace OpenSim
507 switch (ShowWhat) 507 switch (ShowWhat)
508 { 508 {
509 case "uptime": 509 case "uptime":
510 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "OpenSim has been running since " + startuptime.ToString()); 510 m_console.Error("OpenSim has been running since " + startuptime.ToString());
511 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "That is " + (DateTime.Now - startuptime).ToString()); 511 m_console.Error("That is " + (DateTime.Now - startuptime).ToString());
512 break; 512 break;
513 case "users": 513 case "users":
514 OpenSim.world.Avatar TempAv; 514 OpenSim.world.Avatar TempAv;
515 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")); 515 m_console.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP"));
516 foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) 516 foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys)
517 { 517 {
518 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") 518 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar")
519 { 519 {
520 TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID]; 520 TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID];
521 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())); 521 m_console.Error(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()));
522 } 522 }
523 } 523 }
524 break; 524 break;
diff --git a/OpenSim/OpenSim.RegionServer/RegionInfo.cs b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
index 6bd8f08..0e75d8b 100644
--- a/OpenSim/OpenSim.RegionServer/RegionInfo.cs
+++ b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
@@ -82,7 +82,7 @@ namespace OpenSim
82 stIn.Close(); 82 stIn.Close();
83 gridresp.Close(); 83 gridresp.Close();
84 84
85 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); 85 OpenSim.Framework.Console.MainConsole.Instance.Verbose("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse);
86 } 86 }
87 87
88 public void InitConfig(bool sandboxMode, IGenericConfig configData) 88 public void InitConfig(bool sandboxMode, IGenericConfig configData)
@@ -333,21 +333,21 @@ namespace OpenSim
333 } 333 }
334 catch (Exception e) 334 catch (Exception e)
335 { 335 {
336 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured"); 336 OpenSim.Framework.Console.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
337 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString()); 337 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
338 } 338 }
339 339
340 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Simulator Settings Loaded"); 340 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Simulator Settings Loaded");
341 /* OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "UUID: " + this.SimUUID.ToStringHyphenated()); 341 /* MainConsole.Instance.Notice("UUID: " + this.SimUUID.ToStringHyphenated());
342 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Name: " + this.RegionName); 342 MainConsole.Instance.Notice("Name: " + this.RegionName);
343 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); 343 MainConsole.Instance.Notice("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
344 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Handle: " + this.RegionHandle.ToString()); 344 MainConsole.Instance.Notice("Region Handle: " + this.RegionHandle.ToString());
345 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); 345 MainConsole.Instance.Notice("Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort);
346 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sandbox Mode? " + isSandbox.ToString()); 346 MainConsole.Instance.Notice("Sandbox Mode? " + isSandbox.ToString());
347 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset URL: " + this.AssetURL); 347 MainConsole.Instance.Notice("Asset URL: " + this.AssetURL);
348 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset key: " + this.AssetSendKey); 348 MainConsole.Instance.Notice("Asset key: " + this.AssetSendKey);
349 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid URL: " + this.GridURL); 349 MainConsole.Instance.Notice("Grid URL: " + this.GridURL);
350 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid key: " + this.GridSendKey); */ 350 MainConsole.Instance.Notice("Grid key: " + this.GridSendKey); */
351 } 351 }
352 } 352 }
353} 353}
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index 3a93e66..ac65a93 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -144,20 +144,20 @@ namespace OpenSim
144 144
145 public void ServerListener() 145 public void ServerListener()
146 { 146 {
147 m_console.WriteLine("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort); 147 m_console.Notice("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
148 148
149 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort); 149 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
150 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 150 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
151 Server.Bind(ServerIncoming); 151 Server.Bind(ServerIncoming);
152 152
153 m_console.WriteLine("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 153 m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
154 154
155 ipeSender = new IPEndPoint(IPAddress.Any, 0); 155 ipeSender = new IPEndPoint(IPAddress.Any, 0);
156 epSender = (EndPoint)ipeSender; 156 epSender = (EndPoint)ipeSender;
157 ReceivedData = new AsyncCallback(this.OnReceivedData); 157 ReceivedData = new AsyncCallback(this.OnReceivedData);
158 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 158 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
159 159
160 m_console.WriteLine("UDPServer.cs:ServerListener() - Listening..."); 160 m_console.Notice("UDPServer.cs:ServerListener() - Listening...");
161 161
162 } 162 }
163 163
diff --git a/OpenSim/OpenSim.RegionServer/world/Avatar.cs b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
index f9f3cc4..f7a5766 100644
--- a/OpenSim/OpenSim.RegionServer/world/Avatar.cs
+++ b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
@@ -46,7 +46,7 @@ namespace OpenSim.world
46 m_regionTerraform = regionTerraform; 46 m_regionTerraform = regionTerraform;
47 m_regionWaterHeight = regionWater; 47 m_regionWaterHeight = regionWater;
48 48
49 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs - Loading details from grid (DUMMY)"); 49 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs - Loading details from grid (DUMMY)");
50 ControllingClient = TheClient; 50 ControllingClient = TheClient;
51 localid = 8880000 + (this.m_world._localNumber++); 51 localid = 8880000 + (this.m_world._localNumber++);
52 Pos = ControllingClient.startpos; 52 Pos = ControllingClient.startpos;
@@ -211,7 +211,7 @@ namespace OpenSim.world
211 211
212 public void CompleteMovement() 212 public void CompleteMovement()
213 { 213 {
214 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); 214 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet");
215 AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); 215 AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
216 mov.AgentData.SessionID = this.ControllingClient.SessionID; 216 mov.AgentData.SessionID = this.ControllingClient.SessionID;
217 mov.AgentData.AgentID = this.ControllingClient.AgentID; 217 mov.AgentData.AgentID = this.ControllingClient.AgentID;
@@ -382,11 +382,11 @@ namespace OpenSim.world
382 //really really should be moved somewhere else (RegionInfo.cs ?) 382 //really really should be moved somewhere else (RegionInfo.cs ?)
383 public void SendRegionHandshake(World regionInfo) 383 public void SendRegionHandshake(World regionInfo)
384 { 384 {
385 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); 385 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet");
386 System.Text.Encoding _enc = System.Text.Encoding.ASCII; 386 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
387 RegionHandshakePacket handshake = new RegionHandshakePacket(); 387 RegionHandshakePacket handshake = new RegionHandshakePacket();
388 388
389 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); 389 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details");
390 handshake.RegionInfo.BillableFactor = 0; 390 handshake.RegionInfo.BillableFactor = 0;
391 handshake.RegionInfo.IsEstateManager = false; 391 handshake.RegionInfo.IsEstateManager = false;
392 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.m_regInfo.TerrainHeightRange00; 392 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.m_regInfo.TerrainHeightRange00;
@@ -417,7 +417,7 @@ namespace OpenSim.world
417 handshake.RegionInfo.TerrainDetail3 = regionInfo.m_regInfo.TerrainDetail3; 417 handshake.RegionInfo.TerrainDetail3 = regionInfo.m_regInfo.TerrainDetail3;
418 handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37"); 418 handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37");
419 419
420 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); 420 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet");
421 this.ControllingClient.OutPacket(handshake); 421 this.ControllingClient.OutPacket(handshake);
422 } 422 }
423 423
diff --git a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs
index 9e96a4e..2947b96 100644
--- a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs
+++ b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs
@@ -18,7 +18,7 @@ namespace OpenSim.world
18 18
19 public void LoadAnims() 19 public void LoadAnims()
20 { 20 {
21 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations"); 21 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
22 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); 22 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
23 23
24 XmlDocument doc = new XmlDocument(); 24 XmlDocument doc = new XmlDocument();
@@ -35,7 +35,7 @@ namespace OpenSim.world
35 35
36 reader.Close(); 36 reader.Close();
37 37
38 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 38 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
39 39
40 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.world.Avatar.Animations.AnimsLLUUID) 40 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.world.Avatar.Animations.AnimsLLUUID)
41 { 41 {
diff --git a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
index 8924773..6bf1598 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
@@ -113,7 +113,7 @@ namespace OpenSim.world
113 //Uncomment when prim/object UUIDs are random or such 113 //Uncomment when prim/object UUIDs are random or such
114 //2007-03-22 - Randomskk 114 //2007-03-22 - Randomskk
115 //this._primCount--; 115 //this._primCount--;
116 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Deleted UUID " + ent.uuid); 116 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Deleted UUID " + ent.uuid);
117 } 117 }
118 } 118 }
119 } 119 }
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs
index 92de6f0..1f15e9c 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.cs
@@ -15,6 +15,7 @@ using OpenSim.Assets;
15//using OpenSim.world.scripting; 15//using OpenSim.world.scripting;
16using OpenSim.RegionServer.world.scripting; 16using OpenSim.RegionServer.world.scripting;
17using OpenSim.Terrain; 17using OpenSim.Terrain;
18using OpenSim.Framework.Console;
18 19
19namespace OpenSim.world 20namespace OpenSim.world
20{ 21{
@@ -71,12 +72,12 @@ namespace OpenSim.world
71 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); 72 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
72 m_scripts = new Dictionary<string, ScriptFactory>(); 73 m_scripts = new Dictionary<string, ScriptFactory>();
73 74
74 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating new entitities instance"); 75 MainConsole.Instance.Notice("World.cs - creating new entitities instance");
75 Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); 76 Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
76 Avatars = new Dictionary<LLUUID, Avatar>(); 77 Avatars = new Dictionary<LLUUID, Avatar>();
77 Prims = new Dictionary<LLUUID, Primitive>(); 78 Prims = new Dictionary<LLUUID, Primitive>();
78 79
79 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating LandMap"); 80 MainConsole.Instance.Notice("World.cs - creating LandMap");
80 TerrainManager = new TerrainManager(new SecondLife()); 81 TerrainManager = new TerrainManager(new SecondLife());
81 Terrain = new TerrainEngine(); 82 Terrain = new TerrainEngine();
82 Avatar.SetupTemplate("avatar-texture.dat"); 83 Avatar.SetupTemplate("avatar-texture.dat");
@@ -90,7 +91,7 @@ namespace OpenSim.world
90 } 91 }
91 catch (Exception e) 92 catch (Exception e)
92 { 93 {
93 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, "World.cs: Constructor failed with exception " + e.ToString()); 94 OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Constructor failed with exception " + e.ToString());
94 } 95 }
95 } 96 }
96 #endregion 97 #endregion
@@ -110,7 +111,7 @@ namespace OpenSim.world
110 } 111 }
111 catch (Exception e) 112 catch (Exception e)
112 { 113 {
113 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddScript() - Failed with exception " + e.ToString()); 114 MainConsole.Instance.Warn("World.cs: AddScript() - Failed with exception " + e.ToString());
114 } 115 }
115 } 116 }
116 117
@@ -162,7 +163,7 @@ namespace OpenSim.world
162 } 163 }
163 catch (Exception e) 164 catch (Exception e)
164 { 165 {
165 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddScript() - Failed with exception " + e.ToString()); 166 MainConsole.Instance.Warn("World.cs: AddScript() - Failed with exception " + e.ToString());
166 } 167 }
167 } 168 }
168 169
@@ -216,7 +217,7 @@ namespace OpenSim.world
216 } 217 }
217 catch (Exception e) 218 catch (Exception e)
218 { 219 {
219 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: Update() - Failed with exception " + e.ToString()); 220 MainConsole.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString());
220 } 221 }
221 updateLock.ReleaseMutex(); 222 updateLock.ReleaseMutex();
222 } 223 }
@@ -229,15 +230,15 @@ namespace OpenSim.world
229 if (Terrain.tainted > 0) 230 if (Terrain.tainted > 0)
230 { 231 {
231 Terrain.tainted = 0; 232 Terrain.tainted = 0;
232 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); 233 MainConsole.Instance.Notice("World.cs: Backup() - Terrain tainted, saving.");
233 localStorage.SaveMap(Terrain.getHeights1D()); 234 localStorage.SaveMap(Terrain.getHeights1D());
234 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image."); 235 MainConsole.Instance.Notice("World.cs: Backup() - Rebuilding world map image.");
235 Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png"); 236 Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png");
236 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); 237 MainConsole.Instance.Notice("World.cs: Backup() - Terrain saved, informing Physics.");
237 phyScene.SetTerrain(Terrain.getHeights1D()); 238 phyScene.SetTerrain(Terrain.getHeights1D());
238 239
239 // Needs optimising to just send patches which have changed. 240 // Needs optimising to just send patches which have changed.
240 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain changed, informing Clients."); 241 MainConsole.Instance.Notice("World.cs: Backup() - Terrain changed, informing Clients.");
241 foreach (ClientView client in m_clientThreads.Values) 242 foreach (ClientView client in m_clientThreads.Values)
242 { 243 {
243 this.SendLayerData(client); 244 this.SendLayerData(client);
@@ -245,7 +246,7 @@ namespace OpenSim.world
245 } 246 }
246 247
247 // Primitive backup routines -- should only do if there's been a change. 248 // Primitive backup routines -- should only do if there's been a change.
248 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Backing up Primitives"); 249 MainConsole.Instance.Notice("World.cs: Backup() - Backing up Primitives");
249 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 250 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
250 { 251 {
251 Entities[UUID].BackUp(); 252 Entities[UUID].BackUp();
@@ -268,7 +269,7 @@ namespace OpenSim.world
268 catch (Exception e) 269 catch (Exception e)
269 { 270 {
270 // Backup failed 271 // Backup failed
271 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Backup() - Backup Failed with exception " + e.ToString()); 272 OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Backup() - Backup Failed with exception " + e.ToString());
272 return false; 273 return false;
273 } 274 }
274 } 275 }
@@ -314,7 +315,7 @@ namespace OpenSim.world
314 } 315 }
315 catch (Exception e) 316 catch (Exception e)
316 { 317 {
317 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); 318 MainConsole.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
318 return false; 319 return false;
319 } 320 }
320 } 321 }
@@ -358,7 +359,7 @@ namespace OpenSim.world
358 } 359 }
359 catch (Exception e) 360 catch (Exception e)
360 { 361 {
361 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 362 MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
362 } 363 }
363 } 364 }
364 365
@@ -389,7 +390,7 @@ namespace OpenSim.world
389 } 390 }
390 catch (Exception e) 391 catch (Exception e)
391 { 392 {
392 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 393 MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
393 } 394 }
394 } 395 }
395 396
@@ -415,7 +416,7 @@ namespace OpenSim.world
415 } 416 }
416 catch (Exception e) 417 catch (Exception e)
417 { 418 {
418 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 419 MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
419 } 420 }
420 } 421 }
421 422
@@ -461,7 +462,7 @@ namespace OpenSim.world
461 } 462 }
462 catch (Exception e) 463 catch (Exception e)
463 { 464 {
464 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 465 MainConsole.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
465 } 466 }
466 } 467 }
467 #endregion 468 #endregion
@@ -487,7 +488,7 @@ namespace OpenSim.world
487 } 488 }
488 catch (Exception e) 489 catch (Exception e)
489 { 490 {
490 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: GetInitialPrims() - Failed with exception " + e.ToString()); 491 MainConsole.Instance.Warn("World.cs: GetInitialPrims() - Failed with exception " + e.ToString());
491 } 492 }
492 } 493 }
493 494
@@ -498,12 +499,12 @@ namespace OpenSim.world
498 { 499 {
499 try 500 try
500 { 501 {
501 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: LoadPrimsFromStorage() - Loading primitives"); 502 MainConsole.Instance.Notice("World.cs: LoadPrimsFromStorage() - Loading primitives");
502 this.localStorage.LoadPrimitives(this); 503 this.localStorage.LoadPrimitives(this);
503 } 504 }
504 catch (Exception e) 505 catch (Exception e)
505 { 506 {
506 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); 507 MainConsole.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
507 } 508 }
508 } 509 }
509 510
@@ -519,14 +520,14 @@ namespace OpenSim.world
519 { 520 {
520 _primCount = prim.LocalID + 1; 521 _primCount = prim.LocalID + 1;
521 } 522 }
522 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage"); 523 MainConsole.Instance.Notice("World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage");
523 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); 524 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this);
524 nPrim.CreateFromStorage(prim); 525 nPrim.CreateFromStorage(prim);
525 this.Entities.Add(nPrim.uuid, nPrim); 526 this.Entities.Add(nPrim.uuid, nPrim);
526 } 527 }
527 catch (Exception e) 528 catch (Exception e)
528 { 529 {
529 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: PrimFromStorage() - Failed with exception " + e.ToString()); 530 MainConsole.Instance.Warn("World.cs: PrimFromStorage() - Failed with exception " + e.ToString());
530 } 531 }
531 } 532 }
532 533
@@ -539,7 +540,7 @@ namespace OpenSim.world
539 { 540 {
540 try 541 try
541 { 542 {
542 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: AddNewPrim() - Creating new prim"); 543 MainConsole.Instance.Notice("World.cs: AddNewPrim() - Creating new prim");
543 Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this); 544 Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this);
544 prim.CreateFromPacket(addPacket, ownerID, this._primCount); 545 prim.CreateFromPacket(addPacket, ownerID, this._primCount);
545 PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z); 546 PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z);
@@ -557,7 +558,7 @@ namespace OpenSim.world
557 } 558 }
558 catch (Exception e) 559 catch (Exception e)
559 { 560 {
560 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddNewPrim() - Failed with exception " + e.ToString()); 561 MainConsole.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString());
561 } 562 }
562 } 563 }
563 564
@@ -590,10 +591,10 @@ namespace OpenSim.world
590 Avatar newAvatar = null; 591 Avatar newAvatar = null;
591 try 592 try
592 { 593 {
593 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 594 MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
594 newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); 595 newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20);
595 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); 596 MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Adding new avatar to world");
596 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); 597 MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Starting RegionHandshake ");
597 newAvatar.SendRegionHandshake(this); 598 newAvatar.SendRegionHandshake(this);
598 //if (!agentClient.m_child) 599 //if (!agentClient.m_child)
599 //{ 600 //{
@@ -629,7 +630,7 @@ namespace OpenSim.world
629 } 630 }
630 catch (Exception e) 631 catch (Exception e)
631 { 632 {
632 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); 633 MainConsole.Instance.Warn("World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
633 } 634 }
634 return newAvatar; 635 return newAvatar;
635 } 636 }
@@ -655,7 +656,7 @@ namespace OpenSim.world
655 } 656 }
656 catch (Exception e) 657 catch (Exception e)
657 { 658 {
658 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString()); 659 MainConsole.Instance.Warn("World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString());
659 } 660 }
660 } 661 }
661 #endregion 662 #endregion
@@ -689,7 +690,7 @@ namespace OpenSim.world
689 } 690 }
690 catch (Exception e) 691 catch (Exception e)
691 { 692 {
692 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); 693 OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Close() - Failed with exception " + e.ToString());
693 } 694 }
694 } 695 }
695 #endregion 696 #endregion
diff --git a/OpenSim/OpenSim.RegionServer/world/WorldBase.cs b/OpenSim/OpenSim.RegionServer/world/WorldBase.cs
index f8fb49d..2d4b6bf 100644
--- a/OpenSim/OpenSim.RegionServer/world/WorldBase.cs
+++ b/OpenSim/OpenSim.RegionServer/world/WorldBase.cs
@@ -14,6 +14,7 @@ using OpenSim.Framework.Inventory;
14using OpenSim.Assets; 14using OpenSim.Assets;
15using OpenSim.RegionServer.world.scripting; 15using OpenSim.RegionServer.world.scripting;
16using OpenSim.Terrain; 16using OpenSim.Terrain;
17using OpenSim.Framework.Console;
17 18
18namespace OpenSim.world 19namespace OpenSim.world
19{ 20{
@@ -112,7 +113,7 @@ namespace OpenSim.world
112 } 113 }
113 catch (Exception e) 114 catch (Exception e)
114 { 115 {
115 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString()); 116 MainConsole.Instance.Warn("World.cs: SendLayerData() - Failed with exception " + e.ToString());
116 } 117 }
117 } 118 }
118 119
@@ -138,7 +139,7 @@ namespace OpenSim.world
138 } 139 }
139 catch (Exception e) 140 catch (Exception e)
140 { 141 {
141 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString()); 142 MainConsole.Instance.Warn("World.cs: SendLayerData() - Failed with exception " + e.ToString());
142 } 143 }
143 } 144 }
144 #endregion 145 #endregion