aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs12
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs4
-rw-r--r--OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs4
-rw-r--r--OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs10
-rw-r--r--OpenSim/OpenSim.Region/EstateManager.cs6
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.Animations.cs4
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.cs2
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs44
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs4
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs4
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.cs10
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientViewBase.cs8
-rw-r--r--OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs12
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs14
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs32
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs12
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs112
-rw-r--r--OpenSim/OpenSim/Application.cs2
-rw-r--r--OpenSim/OpenSim/OpenSimMain.cs52
21 files changed, 219 insertions, 133 deletions
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
index 70b14c2..87eff49 100644
--- a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
+++ b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
@@ -66,17 +66,17 @@ namespace OpenSim.GridInterfaces.Local
66 this._assetRequests = new BlockingQueue<ARequest>(); 66 this._assetRequests = new BlockingQueue<ARequest>();
67 yapfile = System.IO.File.Exists("assets.yap"); 67 yapfile = System.IO.File.Exists("assets.yap");
68 68
69 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Local Asset Server class created"); 69 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Local Asset Server class created");
70 try 70 try
71 { 71 {
72 db = Db4oFactory.OpenFile("assets.yap"); 72 db = Db4oFactory.OpenFile("assets.yap");
73 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Db4 Asset database creation"); 73 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Db4 Asset database creation");
74 } 74 }
75 catch (Exception e) 75 catch (Exception e)
76 { 76 {
77 db.Close(); 77 db.Close();
78 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); 78 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured");
79 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString()); 79 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
80 } 80 }
81 if (!yapfile) 81 if (!yapfile)
82 { 82 {
@@ -124,7 +124,7 @@ namespace OpenSim.GridInterfaces.Local
124 { 124 {
125 if (db != null) 125 if (db != null)
126 { 126 {
127 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Closing local asset server database"); 127 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Closing local asset server database");
128 db.Close(); 128 db.Close();
129 } 129 }
130 } 130 }
@@ -168,7 +168,7 @@ namespace OpenSim.GridInterfaces.Local
168 try 168 try
169 { 169 {
170 170
171 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Setting up asset database"); 171 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Setting up asset database");
172 172
173 AssetBase Image = new AssetBase(); 173 AssetBase Image = new AssetBase();
174 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); 174 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs b/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs
index be00fa7..ca01c68 100644
--- a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs
+++ b/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs
@@ -53,7 +53,7 @@ namespace OpenSim.GridInterfaces.Remote
53 this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests)); 53 this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests));
54 this._remoteAssetServerThread.IsBackground = true; 54 this._remoteAssetServerThread.IsBackground = true;
55 this._remoteAssetServerThread.Start(); 55 this._remoteAssetServerThread.Start();
56 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Remote Asset Server class created"); 56 OpenSim.Framework.Console.MainLog.Instance.Verbose("Remote Asset Server class created");
57 } 57 }
58 58
59 public void SetReceiver(IAssetReceiver receiver) 59 public void SetReceiver(IAssetReceiver receiver)
@@ -98,7 +98,7 @@ namespace OpenSim.GridInterfaces.Remote
98 // 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM 98 // 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM
99 ARequest req = this._assetRequests.Dequeue(); 99 ARequest req = this._assetRequests.Dequeue();
100 LLUUID assetID = req.AssetID; 100 LLUUID assetID = req.AssetID;
101 // OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW," RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID); 101 // OpenSim.Framework.Console.MainLog.Instance.Verbose(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID);
102 WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID); 102 WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID);
103 WebResponse AssetResponse = AssetLoad.GetResponse(); 103 WebResponse AssetResponse = AssetLoad.GetResponse();
104 byte[] idata = new byte[(int)AssetResponse.ContentLength]; 104 byte[] idata = new byte[(int)AssetResponse.ContentLength];
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs
index 26506c1..efccb36 100644
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs
+++ b/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs
@@ -56,12 +56,12 @@ namespace OpenSim.Physics.Manager
56 56
57 if(_plugins.ContainsKey(engineName)) 57 if(_plugins.ContainsKey(engineName))
58 { 58 {
59 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); 59 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName);
60 return _plugins[engineName].GetScene(); 60 return _plugins[engineName].GetScene();
61 } 61 }
62 else 62 else
63 { 63 {
64 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); 64 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName);
65 throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName)); 65 throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName));
66 } 66 }
67 } 67 }
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs
index 7a254c6..0901c2f 100644
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Physics.Manager
68 68
69 public override PhysicsActor AddAvatar(PhysicsVector position) 69 public override PhysicsActor AddAvatar(PhysicsVector position)
70 { 70 {
71 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"NullPhysicsScene : AddAvatar({0})", position); 71 OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
72 return PhysicsActor.Null; 72 return PhysicsActor.Null;
73 } 73 }
74 74
@@ -79,7 +79,7 @@ namespace OpenSim.Physics.Manager
79 79
80 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 80 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
81 { 81 {
82 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : AddPrim({0},{1})", position, size); 82 OpenSim.Framework.Console.MainLog.Instance.Verbose( "NullPhysicsScene : AddPrim({0},{1})", position, size);
83 return PhysicsActor.Null; 83 return PhysicsActor.Null;
84 } 84 }
85 85
@@ -87,17 +87,17 @@ namespace OpenSim.Physics.Manager
87 { 87 {
88 m_workIndicator = (m_workIndicator + 1) % 10; 88 m_workIndicator = (m_workIndicator + 1) % 10;
89 89
90 //OpenSim.Framework.Console.MainConsole.Instance.SetStatus(m_workIndicator.ToString()); 90 //OpenSim.Framework.Console.MainLog.Instance.SetStatus(m_workIndicator.ToString());
91 } 91 }
92 92
93 public override void GetResults() 93 public override void GetResults()
94 { 94 {
95 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : GetResults()"); 95 OpenSim.Framework.Console.MainLog.Instance.Verbose( "NullPhysicsScene : GetResults()");
96 } 96 }
97 97
98 public override void SetTerrain(float[] heightMap) 98 public override void SetTerrain(float[] heightMap)
99 { 99 {
100 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); 100 OpenSim.Framework.Console.MainLog.Instance.Verbose( "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
101 } 101 }
102 102
103 public override void DeleteTerrain() 103 public override void DeleteTerrain()
diff --git a/OpenSim/OpenSim.Region/EstateManager.cs b/OpenSim/OpenSim.Region/EstateManager.cs
index 69ce481..3b918b1 100644
--- a/OpenSim/OpenSim.Region/EstateManager.cs
+++ b/OpenSim/OpenSim.Region/EstateManager.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region
79 case "setregioninfo": 79 case "setregioninfo":
80 if (packet.ParamList.Length != 9) 80 if (packet.ParamList.Length != 9)
81 { 81 {
82 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); 82 OpenSim.Framework.Console.MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
83 } 83 }
84 else 84 else
85 { 85 {
@@ -223,7 +223,7 @@ namespace OpenSim.Region
223 case "setregionterrain": 223 case "setregionterrain":
224 if (packet.ParamList.Length != 9) 224 if (packet.ParamList.Length != 9)
225 { 225 {
226 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); 226 OpenSim.Framework.Console.MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
227 } 227 }
228 else 228 else
229 { 229 {
@@ -237,7 +237,7 @@ namespace OpenSim.Region
237 } 237 }
238 break; 238 break;
239 default: 239 default:
240 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); 240 OpenSim.Framework.Console.MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
241 break; 241 break;
242 } 242 }
243 } 243 }
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.Animations.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.Animations.cs
index 1963a8a..cc0fb7a 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.Animations.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.Animations.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Scenes
47 47
48 public void LoadAnims() 48 public void LoadAnims()
49 { 49 {
50 //OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations"); 50 //OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
51 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); 51 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
52 52
53 XmlDocument doc = new XmlDocument(); 53 XmlDocument doc = new XmlDocument();
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Scenes
64 64
65 reader.Close(); 65 reader.Close();
66 66
67 // OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 67 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
68 68
69 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Scenes.Avatar.Animations.AnimsLLUUID) 69 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Scenes.Avatar.Animations.AnimsLLUUID)
70 { 70 {
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
index 3e371f0..1149896 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Scenes
78 78
79 m_regionInfo = reginfo; 79 m_regionInfo = reginfo;
80 m_regionHandle = reginfo.RegionHandle; 80 m_regionHandle = reginfo.RegionHandle;
81 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); 81 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Avatar.cs - Loading details from grid (DUMMY)");
82 ControllingClient = theClient; 82 ControllingClient = theClient;
83 this.firstname = ControllingClient.FirstName; 83 this.firstname = ControllingClient.FirstName;
84 this.lastname = ControllingClient.LastName; 84 this.lastname = ControllingClient.LastName;
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index 724d215..ffcc0c8 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -117,12 +117,12 @@ namespace OpenSim.Region.Scenes
117 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); 117 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
118 m_scripts = new Dictionary<string, ScriptFactory>(); 118 m_scripts = new Dictionary<string, ScriptFactory>();
119 119
120 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating new entitities instance"); 120 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs - creating new entitities instance");
121 Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); 121 Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
122 Avatars = new Dictionary<LLUUID, Avatar>(); 122 Avatars = new Dictionary<LLUUID, Avatar>();
123 Prims = new Dictionary<LLUUID, Primitive>(); 123 Prims = new Dictionary<LLUUID, Primitive>();
124 124
125 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating LandMap"); 125 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs - creating LandMap");
126 TerrainManager = new TerrainManager(new SecondLife()); 126 TerrainManager = new TerrainManager(new SecondLife());
127 Terrain = new TerrainEngine(); 127 Terrain = new TerrainEngine();
128 128
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Scenes
130 } 130 }
131 catch (Exception e) 131 catch (Exception e)
132 { 132 {
133 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, "World.cs: Constructor failed with exception " + e.ToString()); 133 OpenSim.Framework.Console.MainLog.Instance.Error( "World.cs: Constructor failed with exception " + e.ToString());
134 } 134 }
135 } 135 }
136 #endregion 136 #endregion
@@ -206,7 +206,7 @@ namespace OpenSim.Region.Scenes
206 } 206 }
207 catch (Exception e) 207 catch (Exception e)
208 { 208 {
209 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: Update() - Failed with exception " + e.ToString()); 209 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString());
210 } 210 }
211 updateLock.ReleaseMutex(); 211 updateLock.ReleaseMutex();
212 212
@@ -225,9 +225,9 @@ namespace OpenSim.Region.Scenes
225 if (Terrain.tainted > 0) 225 if (Terrain.tainted > 0)
226 { 226 {
227 Terrain.tainted = 0; 227 Terrain.tainted = 0;
228 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); 228 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs: Backup() - Terrain tainted, saving.");
229 localStorage.SaveMap(Terrain.getHeights1D()); 229 localStorage.SaveMap(Terrain.getHeights1D());
230 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); 230 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs: Backup() - Terrain saved, informing Physics.");
231 lock (this.m_syncRoot) 231 lock (this.m_syncRoot)
232 { 232 {
233 phyScene.SetTerrain(Terrain.getHeights1D()); 233 phyScene.SetTerrain(Terrain.getHeights1D());
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Scenes
235 } 235 }
236 236
237 // Primitive backup routines 237 // Primitive backup routines
238 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Backing up Primitives"); 238 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs: Backup() - Backing up Primitives");
239 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 239 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
240 { 240 {
241 Entities[UUID].BackUp(); 241 Entities[UUID].BackUp();
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Scenes
257 catch (Exception e) 257 catch (Exception e)
258 { 258 {
259 // Backup failed 259 // Backup failed
260 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Backup() - Backup Failed with exception " + e.ToString()); 260 OpenSim.Framework.Console.MainLog.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Backup() - Backup Failed with exception " + e.ToString());
261 return false; 261 return false;
262 } 262 }
263 */ 263 */
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Scenes
305 } 305 }
306 catch (Exception e) 306 catch (Exception e)
307 { 307 {
308 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); 308 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
309 return false; 309 return false;
310 } 310 }
311 } 311 }
@@ -341,7 +341,7 @@ namespace OpenSim.Region.Scenes
341 } 341 }
342 catch (Exception e) 342 catch (Exception e)
343 { 343 {
344 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 344 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
345 } 345 }
346 } 346 }
347 347
@@ -372,7 +372,7 @@ namespace OpenSim.Region.Scenes
372 } 372 }
373 catch (Exception e) 373 catch (Exception e)
374 { 374 {
375 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 375 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
376 } 376 }
377 } 377 }
378 378
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Scenes
398 } 398 }
399 catch (Exception e) 399 catch (Exception e)
400 { 400 {
401 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 401 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
402 } 402 }
403 } 403 }
404 404
@@ -451,7 +451,7 @@ namespace OpenSim.Region.Scenes
451 } 451 }
452 catch (Exception e) 452 catch (Exception e)
453 { 453 {
454 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 454 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
455 } 455 }
456 } 456 }
457 457
@@ -483,12 +483,12 @@ namespace OpenSim.Region.Scenes
483 { 483 {
484 try 484 try
485 { 485 {
486 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: LoadPrimsFromStorage() - Loading primitives"); 486 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs: LoadPrimsFromStorage() - Loading primitives");
487 this.localStorage.LoadPrimitives(this); 487 this.localStorage.LoadPrimitives(this);
488 } 488 }
489 catch (Exception e) 489 catch (Exception e)
490 { 490 {
491 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); 491 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
492 } 492 }
493 } 493 }
494 494
@@ -520,7 +520,7 @@ namespace OpenSim.Region.Scenes
520 { 520 {
521 try 521 try
522 { 522 {
523 // MainConsole.Instance.Notice("World.cs: AddNewPrim() - Creating new prim"); 523 // MainLog.Instance.Notice("World.cs: AddNewPrim() - Creating new prim");
524 Primitive prim = new Primitive(m_regionHandle, this, addPacket, ownerID, this._primCount); 524 Primitive prim = new Primitive(m_regionHandle, this, addPacket, ownerID, this._primCount);
525 525
526 this.Entities.Add(prim.uuid, prim); 526 this.Entities.Add(prim.uuid, prim);
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Scenes
528 } 528 }
529 catch (Exception e) 529 catch (Exception e)
530 { 530 {
531 // MainConsole.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString()); 531 // MainLog.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString());
532 } 532 }
533 } 533 }
534 534
@@ -563,10 +563,10 @@ namespace OpenSim.Region.Scenes
563 Avatar newAvatar = null; 563 Avatar newAvatar = null;
564 try 564 try
565 { 565 {
566 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 566 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
567 newAvatar = new Avatar(remoteClient, this, this.m_regInfo); 567 newAvatar = new Avatar(remoteClient, this, this.m_regInfo);
568 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); 568 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs:AddViewerAgent() - Adding new avatar to world");
569 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); 569 OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs:AddViewerAgent() - Starting RegionHandshake ");
570 570
571 //newAvatar.SendRegionHandshake(); 571 //newAvatar.SendRegionHandshake();
572 this.estateManager.sendRegionHandshake(remoteClient); 572 this.estateManager.sendRegionHandshake(remoteClient);
@@ -602,7 +602,7 @@ namespace OpenSim.Region.Scenes
602 } 602 }
603 catch (Exception e) 603 catch (Exception e)
604 { 604 {
605 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); 605 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
606 } 606 }
607 return; 607 return;
608 } 608 }
@@ -685,7 +685,7 @@ namespace OpenSim.Region.Scenes
685 } 685 }
686 catch (Exception e) 686 catch (Exception e)
687 { 687 {
688 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); 688 OpenSim.Framework.Console.MainLog.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString());
689 } 689 }
690 } 690 }
691 #endregion 691 #endregion
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index bb4dccd..ee6d741 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -245,7 +245,7 @@ namespace OpenSim
245 } 245 }
246 catch (Exception e) 246 catch (Exception e)
247 { 247 {
248 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); 248 OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString());
249 } 249 }
250 } 250 }
251 251
@@ -271,7 +271,7 @@ namespace OpenSim
271 } 271 }
272 catch (Exception e) 272 catch (Exception e)
273 { 273 {
274 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); 274 OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString());
275 } 275 }
276 } 276 }
277 277
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
index 219cdae..4a1b6ad 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
@@ -55,7 +55,7 @@ namespace OpenSim
55 55
56 protected virtual bool Logout(ClientView simClient, Packet packet) 56 protected virtual bool Logout(ClientView simClient, Packet packet)
57 { 57 {
58 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); 58 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request");
59 //send reply to let the client logout 59 //send reply to let the client logout
60 LogoutReplyPacket logReply = new LogoutReplyPacket(); 60 LogoutReplyPacket logReply = new LogoutReplyPacket();
61 logReply.AgentData.AgentID = this.AgentID; 61 logReply.AgentData.AgentID = this.AgentID;
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index 601fd97..d53832f 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -191,7 +191,7 @@ namespace OpenSim
191 191
192 #region Objects/Prims 192 #region Objects/Prims
193 case PacketType.ObjectLink: 193 case PacketType.ObjectLink:
194 // OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, Pack.ToString()); 194 // OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString());
195 ObjectLinkPacket link = (ObjectLinkPacket)Pack; 195 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
196 uint parentprimid = 0; 196 uint parentprimid = 0;
197 List<uint> childrenprims = new List<uint>(); 197 List<uint> childrenprims = new List<uint>();
@@ -514,7 +514,7 @@ namespace OpenSim
514 //Console.WriteLine(Pack.ToString()); 514 //Console.WriteLine(Pack.ToString());
515 break; 515 break;
516 case PacketType.ObjectScale: 516 case PacketType.ObjectScale:
517 //OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, Pack.ToString()); 517 //OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString());
518 break; 518 break;
519 #endregion 519 #endregion
520 } 520 }
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs
index c5f0a1d..b089bdc 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.cs
@@ -90,7 +90,7 @@ namespace OpenSim
90 m_inventoryCache = inventoryCache; 90 m_inventoryCache = inventoryCache;
91 m_authenticateSessionsHandler = authenSessions; 91 m_authenticateSessionsHandler = authenSessions;
92 92
93 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs - Started up new client thread to handle incoming request"); 93 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request");
94 cirpack = initialcirpack; 94 cirpack = initialcirpack;
95 userEP = remoteEP; 95 userEP = remoteEP;
96 96
@@ -188,7 +188,7 @@ namespace OpenSim
188 188
189 protected virtual void ClientLoop() 189 protected virtual void ClientLoop()
190 { 190 {
191 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ClientLoop() - Entered loop"); 191 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop");
192 while (true) 192 while (true)
193 { 193 {
194 QueItem nextPacket = PacketQueue.Dequeue(); 194 QueItem nextPacket = PacketQueue.Dequeue();
@@ -210,7 +210,7 @@ namespace OpenSim
210 210
211 protected virtual void InitNewClient() 211 protected virtual void InitNewClient()
212 { 212 {
213 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); 213 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
214 this.m_world.AddNewAvatar(this, this.AgentID, false); 214 this.m_world.AddNewAvatar(this, this.AgentID, false);
215 } 215 }
216 216
@@ -221,12 +221,12 @@ namespace OpenSim
221 if (!sessionInfo.Authorised) 221 if (!sessionInfo.Authorised)
222 { 222 {
223 //session/circuit not authorised 223 //session/circuit not authorised
224 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); 224 OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
225 ClientThread.Abort(); 225 ClientThread.Abort();
226 } 226 }
227 else 227 else
228 { 228 {
229 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); 229 OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
230 //session is authorised 230 //session is authorised
231 this.AgentID = cirpack.CircuitCode.ID; 231 this.AgentID = cirpack.CircuitCode.ID;
232 this.SessionID = cirpack.CircuitCode.SessionID; 232 this.SessionID = cirpack.CircuitCode.SessionID;
diff --git a/OpenSim/OpenSim.RegionServer/ClientViewBase.cs b/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
index facb3fa..8b503f0 100644
--- a/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
@@ -159,7 +159,7 @@ namespace OpenSim
159 } 159 }
160 catch (Exception) 160 catch (Exception)
161 { 161 {
162 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); 162 OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
163 this.KillThread(); 163 this.KillThread();
164 } 164 }
165 165
@@ -254,7 +254,7 @@ namespace OpenSim
254 { 254 {
255 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) 255 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
256 { 256 {
257 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Resending " + packet.Type.ToString() + " packet, " + 257 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " +
258 (now - packet.TickCount) + "ms have passed"); 258 (now - packet.TickCount) + "ms have passed");
259 259
260 packet.Header.Resent = true; 260 packet.Header.Resent = true;
@@ -273,11 +273,11 @@ namespace OpenSim
273 if (PendingAcks.Count > 250) 273 if (PendingAcks.Count > 250)
274 { 274 {
275 // FIXME: Handle the odd case where we have too many pending ACKs queued up 275 // FIXME: Handle the odd case where we have too many pending ACKs queued up
276 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Too many ACKs queued up!"); 276 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Too many ACKs queued up!");
277 return; 277 return;
278 } 278 }
279 279
280 //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sending PacketAck"); 280 //OpenSim.Framework.Console.MainLog.Instance.WriteLine("Sending PacketAck");
281 281
282 282
283 int i = 0; 283 int i = 0;
diff --git a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
index 635bbdf..407ebe0 100644
--- a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
+++ b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
@@ -60,7 +60,7 @@ namespace OpenSim
60 attri = configData.GetAttribute("GridServerURL"); 60 attri = configData.GetAttribute("GridServerURL");
61 if (attri == "") 61 if (attri == "")
62 { 62 {
63 this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); 63 this.GridURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
64 configData.SetAttribute("GridServerURL", this.GridURL); 64 configData.SetAttribute("GridServerURL", this.GridURL);
65 } 65 }
66 else 66 else
@@ -73,7 +73,7 @@ namespace OpenSim
73 attri = configData.GetAttribute("GridSendKey"); 73 attri = configData.GetAttribute("GridSendKey");
74 if (attri == "") 74 if (attri == "")
75 { 75 {
76 this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server", "null"); 76 this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server", "null");
77 configData.SetAttribute("GridSendKey", this.GridSendKey); 77 configData.SetAttribute("GridSendKey", this.GridSendKey);
78 } 78 }
79 else 79 else
@@ -86,7 +86,7 @@ namespace OpenSim
86 attri = configData.GetAttribute("GridRecvKey"); 86 attri = configData.GetAttribute("GridRecvKey");
87 if (attri == "") 87 if (attri == "")
88 { 88 {
89 this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server", "null"); 89 this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server", "null");
90 configData.SetAttribute("GridRecvKey", this.GridRecvKey); 90 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
91 } 91 }
92 else 92 else
@@ -98,7 +98,7 @@ namespace OpenSim
98 attri = configData.GetAttribute("AssetServerURL"); 98 attri = configData.GetAttribute("AssetServerURL");
99 if (attri == "") 99 if (attri == "")
100 { 100 {
101 this.AssetURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); 101 this.AssetURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/");
102 configData.SetAttribute("AssetServerURL", this.GridURL); 102 configData.SetAttribute("AssetServerURL", this.GridURL);
103 } 103 }
104 else 104 else
@@ -111,8 +111,8 @@ namespace OpenSim
111 } 111 }
112 catch (Exception e) 112 catch (Exception e)
113 { 113 {
114 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Config.cs:InitConfig() - Exception occured"); 114 OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
115 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString()); 115 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
116 } 116 }
117 } 117 }
118 } 118 }
diff --git a/OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs b/OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs
index 8509dcc..fd16e93 100644
--- a/OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs
+++ b/OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs
@@ -76,7 +76,7 @@ namespace OpenSim
76 protected BaseHttpServer httpServer; 76 protected BaseHttpServer httpServer;
77 protected List<AuthenticateSessionsBase> AuthenticateSessionsHandler = new List<AuthenticateSessionsBase>(); 77 protected List<AuthenticateSessionsBase> AuthenticateSessionsHandler = new List<AuthenticateSessionsBase>();
78 78
79 protected ConsoleBase m_console; 79 protected LogBase m_log;
80 80
81 public RegionApplicationBase() 81 public RegionApplicationBase()
82 { 82 {
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index 54ec480..002e664 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -68,7 +68,7 @@ namespace OpenSim
68 protected IWorld m_localWorld; 68 protected IWorld m_localWorld;
69 protected AssetCache m_assetCache; 69 protected AssetCache m_assetCache;
70 protected InventoryCache m_inventoryCache; 70 protected InventoryCache m_inventoryCache;
71 protected ConsoleBase m_console; 71 protected LogBase m_log;
72 protected AuthenticateSessionsBase m_authenticateSessionsClass; 72 protected AuthenticateSessionsBase m_authenticateSessionsClass;
73 73
74 public PacketServer PacketServer 74 public PacketServer PacketServer
@@ -96,12 +96,12 @@ namespace OpenSim
96 { 96 {
97 } 97 }
98 98
99 public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, ConsoleBase console, AuthenticateSessionsBase authenticateClass) 99 public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, LogBase console, AuthenticateSessionsBase authenticateClass)
100 { 100 {
101 listenPort = port; 101 listenPort = port;
102 this.m_assetCache = assetCache; 102 this.m_assetCache = assetCache;
103 this.m_inventoryCache = inventoryCache; 103 this.m_inventoryCache = inventoryCache;
104 this.m_console = console; 104 this.m_log = console;
105 this.m_authenticateSessionsClass = authenticateClass; 105 this.m_authenticateSessionsClass = authenticateClass;
106 this.CreatePacketServer(); 106 this.CreatePacketServer();
107 107
@@ -135,7 +135,7 @@ namespace OpenSim
135 } 135 }
136 else 136 else
137 { // invalid client 137 { // invalid client
138 Console.Error.WriteLine("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString()); 138 m_log.Warn("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString());
139 } 139 }
140 140
141 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 141 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
@@ -151,20 +151,20 @@ namespace OpenSim
151 151
152 public void ServerListener() 152 public void ServerListener()
153 { 153 {
154 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort); 154 m_log.Status("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
155 155
156 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort); 156 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
157 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 157 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
158 Server.Bind(ServerIncoming); 158 Server.Bind(ServerIncoming);
159 159
160 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 160 m_log.Verbose("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
161 161
162 ipeSender = new IPEndPoint(IPAddress.Any, 0); 162 ipeSender = new IPEndPoint(IPAddress.Any, 0);
163 epSender = (EndPoint)ipeSender; 163 epSender = (EndPoint)ipeSender;
164 ReceivedData = new AsyncCallback(this.OnReceivedData); 164 ReceivedData = new AsyncCallback(this.OnReceivedData);
165 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 165 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
166 166
167 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Listening..."); 167 m_log.Verbose("UDPServer.cs:ServerListener() - Listening...");
168 168
169 } 169 }
170 170
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
index 93f55d6..a6c2872 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -53,18 +53,18 @@ namespace OpenSim.Storage.LocalStorageDb4o
53 53
54 public void Initialise(string dfile) 54 public void Initialise(string dfile)
55 { 55 {
56 OpenSim.Framework.Console.MainConsole.Instance.Warn("Db4LocalStorage Opening " + dfile); 56 OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile);
57 datastore = dfile; 57 datastore = dfile;
58 try 58 try
59 { 59 {
60 db = Db4oFactory.OpenFile(datastore); 60 db = Db4oFactory.OpenFile(datastore);
61 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Db4LocalStorage creation"); 61 OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage creation");
62 } 62 }
63 catch (Exception e) 63 catch (Exception e)
64 { 64 {
65 db.Close(); 65 db.Close();
66 OpenSim.Framework.Console.MainConsole.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); 66 OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured");
67 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 67 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
68 } 68 }
69 } 69 }
70 70
@@ -123,7 +123,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
123 public void LoadPrimitives(ILocalStorageReceiver receiver) 123 public void LoadPrimitives(ILocalStorageReceiver receiver)
124 { 124 {
125 IObjectSet result = db.Get(typeof(PrimData)); 125 IObjectSet result = db.Get(typeof(PrimData));
126 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); 126 OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count);
127 foreach (PrimData prim in result) 127 foreach (PrimData prim in result)
128 { 128 {
129 receiver.PrimFromStorage(prim); 129 receiver.PrimFromStorage(prim);
@@ -132,13 +132,13 @@ namespace OpenSim.Storage.LocalStorageDb4o
132 132
133 public float[] LoadWorld() 133 public float[] LoadWorld()
134 { 134 {
135 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Loading world...."); 135 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Loading world....");
136 float[] heightmap = null; 136 float[] heightmap = null;
137 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); 137 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB");
138 IObjectSet world_result = db.Get(typeof(MapStorage)); 138 IObjectSet world_result = db.Get(typeof(MapStorage));
139 if (world_result.Count > 0) 139 if (world_result.Count > 0)
140 { 140 {
141 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); 141 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading");
142 MapStorage map = (MapStorage)world_result.Next(); 142 MapStorage map = (MapStorage)world_result.Next();
143 //blank.LandMap = map.Map; 143 //blank.LandMap = map.Map;
144 heightmap = map.Map; 144 heightmap = map.Map;
@@ -151,7 +151,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
151 IObjectSet world_result = db.Get(typeof(MapStorage)); 151 IObjectSet world_result = db.Get(typeof(MapStorage));
152 if (world_result.Count > 0) 152 if (world_result.Count > 0)
153 { 153 {
154 OpenSim.Framework.Console.MainConsole.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); 154 OpenSim.Framework.Console.MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database");
155 MapStorage map = (MapStorage)world_result.Next(); 155 MapStorage map = (MapStorage)world_result.Next();
156 db.Delete(map); 156 db.Delete(map);
157 } 157 }
@@ -209,7 +209,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
209 209
210 public void SaveParcels(ParcelData[] parcel_data) 210 public void SaveParcels(ParcelData[] parcel_data)
211 { 211 {
212 MainConsole.Instance.Notice("Parcel Backup: Saving Parcels..."); 212 MainLog.Instance.Notice("Parcel Backup: Saving Parcels...");
213 int i; 213 int i;
214 for (i = 0; i < parcel_data.GetLength(0); i++) 214 for (i = 0; i < parcel_data.GetLength(0); i++)
215 { 215 {
@@ -217,7 +217,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
217 SaveParcel(parcel_data[i]); 217 SaveParcel(parcel_data[i]);
218 218
219 } 219 }
220 MainConsole.Instance.Notice("Parcel Backup: Parcel Save Complete"); 220 MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete");
221 } 221 }
222 222
223 public void RemoveParcel(ParcelData parcel) 223 public void RemoveParcel(ParcelData parcel)
@@ -231,7 +231,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
231 } 231 }
232 public void RemoveAllParcels() 232 public void RemoveAllParcels()
233 { 233 {
234 MainConsole.Instance.Notice("Parcel Backup: Removing all parcels..."); 234 MainLog.Instance.Notice("Parcel Backup: Removing all parcels...");
235 IObjectSet result = db.Get(typeof(ParcelData)); 235 IObjectSet result = db.Get(typeof(ParcelData));
236 if (result.Count > 0) 236 if (result.Count > 0)
237 { 237 {
@@ -244,11 +244,11 @@ namespace OpenSim.Storage.LocalStorageDb4o
244 244
245 public void LoadParcels(ILocalStorageParcelReceiver recv) 245 public void LoadParcels(ILocalStorageParcelReceiver recv)
246 { 246 {
247 MainConsole.Instance.Notice("Parcel Backup: Loading Parcels..."); 247 MainLog.Instance.Notice("Parcel Backup: Loading Parcels...");
248 IObjectSet result = db.Get(typeof(ParcelData)); 248 IObjectSet result = db.Get(typeof(ParcelData));
249 if (result.Count > 0) 249 if (result.Count > 0)
250 { 250 {
251 MainConsole.Instance.Notice("Parcel Backup: Parcels exist in database."); 251 MainLog.Instance.Notice("Parcel Backup: Parcels exist in database.");
252 foreach (ParcelData parcelData in result) 252 foreach (ParcelData parcelData in result)
253 { 253 {
254 254
@@ -257,10 +257,10 @@ namespace OpenSim.Storage.LocalStorageDb4o
257 } 257 }
258 else 258 else
259 { 259 {
260 MainConsole.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel."); 260 MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel.");
261 recv.NoParcelDataFromStorage(); 261 recv.NoParcelDataFromStorage();
262 } 262 }
263 MainConsole.Instance.Notice("Parcel Backup: Parcels Restored"); 263 MainLog.Instance.Notice("Parcel Backup: Parcels Restored");
264 } 264 }
265 public void ShutDown() 265 public void ShutDown()
266 { 266 {
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
index ee8b9ff..fa1abc8 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
+++ b/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
@@ -54,8 +54,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
54 catch (Exception e) 54 catch (Exception e)
55 { 55 {
56 db.Close(); 56 db.Close();
57 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); 57 OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured");
58 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 58 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
59 } 59 }
60 } 60 }
61 61
@@ -117,8 +117,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
117 } 117 }
118 catch (Exception e) 118 catch (Exception e)
119 { 119 {
120 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); 120 OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured");
121 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 121 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
122 } 122 }
123 123
124 cmd.Dispose(); 124 cmd.Dispose();
@@ -144,8 +144,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
144 } 144 }
145 catch (Exception e) 145 catch (Exception e)
146 { 146 {
147 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); 147 OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured");
148 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 148 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
149 } 149 }
150 150
151 cmd.Dispose(); 151 cmd.Dispose();
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
index fc4ca24..c78af05 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
@@ -34,6 +34,17 @@ using OpenJPEGNet;
34 34
35namespace OpenSim.Terrain 35namespace OpenSim.Terrain
36{ 36{
37 public class TerrainCommand
38 {
39 public virtual bool run(string[] cmdargs, ref string output)
40 {
41 return false;
42 }
43
44 public string args;
45 public string help;
46 }
47
37 public class TerrainEngine 48 public class TerrainEngine
38 { 49 {
39 /// <summary> 50 /// <summary>
@@ -42,6 +53,16 @@ namespace OpenSim.Terrain
42 public Channel heightmap; 53 public Channel heightmap;
43 54
44 /// <summary> 55 /// <summary>
56 /// A copy of heightmap at the last save point (for reverting)
57 /// </summary>
58 public Channel revertmap;
59
60 /// <summary>
61 /// Water heightmap (needs clientside mods to work)
62 /// </summary>
63 public Channel watermap;
64
65 /// <summary>
45 /// Whether or not the terrain has been modified since it was last saved and sent to the Physics engine. 66 /// Whether or not the terrain has been modified since it was last saved and sent to the Physics engine.
46 /// Counts the number of modifications since the last save. (0 = Untainted) 67 /// Counts the number of modifications since the last save. (0 = Untainted)
47 /// </summary> 68 /// </summary>
@@ -145,6 +166,7 @@ namespace OpenSim.Terrain
145 { 166 {
146 case "help": 167 case "help":
147 resultText += "terrain regenerate - rebuilds the sims terrain using a default algorithm\n"; 168 resultText += "terrain regenerate - rebuilds the sims terrain using a default algorithm\n";
169 resultText += "terrain voronoi <points> <blocksize> - generates a worley fractal with X points per block";
148 resultText += "terrain seed <seed> - sets the random seed value to <seed>\n"; 170 resultText += "terrain seed <seed> - sets the random seed value to <seed>\n";
149 resultText += "terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64', 'RAW' or 'IMG'\n"; 171 resultText += "terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64', 'RAW' or 'IMG'\n";
150 resultText += "terrain save <type> <filename> - saves a terrain to disk, type can be 'F32' or 'F64'\n"; 172 resultText += "terrain save <type> <filename> - saves a terrain to disk, type can be 'F32' or 'F64'\n";
@@ -160,21 +182,18 @@ namespace OpenSim.Terrain
160 break; 182 break;
161 183
162 case "erode": 184 case "erode":
163 switch (args[1].ToLower()) 185 return consoleErosion(args, ref resultText);
164 { 186
165 case "aerobic": 187 case "voronoi":
166 // WindSpeed, PickupMinimum,DropMinimum,Carry,Rounds,Lowest 188 double[] c = new double[2];
167 heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7])); 189 c[0] = -1;
168 break; 190 c[1] = 1;
169 case "thermal": 191 heightmap.voronoiDiagram(Convert.ToInt32(args[1]), Convert.ToInt32(args[2]), c);
170 heightmap.thermalWeathering(Convert.ToDouble(args[2]), Convert.ToInt32(args[3]), Convert.ToDouble(args[4]));
171 break;
172 default:
173 resultText = "Unknown erosion type";
174 return false;
175 }
176 break; 192 break;
177 193
194 case "hills":
195 return consoleHills(args, ref resultText);
196
178 case "regenerate": 197 case "regenerate":
179 hills(); 198 hills();
180 break; 199 break;
@@ -246,6 +265,73 @@ namespace OpenSim.Terrain
246 } 265 }
247 } 266 }
248 267
268 private bool consoleErosion(string[] args, ref string resultText)
269 {
270 switch (args[1].ToLower())
271 {
272 case "aerobic":
273 // WindSpeed, PickupMinimum,DropMinimum,Carry,Rounds,Lowest
274 heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7]));
275 break;
276 case "thermal":
277 heightmap.thermalWeathering(Convert.ToDouble(args[2]), Convert.ToInt32(args[3]), Convert.ToDouble(args[4]));
278 break;
279 default:
280 resultText = "Unknown erosion type";
281 return false;
282 }
283 return true;
284 }
285
286 private bool consoleHills(string[] args, ref string resultText)
287 {
288 int count;
289 double sizeMin;
290 double sizeRange;
291 bool island;
292 bool additive;
293 bool noisy;
294
295 if (args.GetLength(0) > 2)
296 {
297 count = Convert.ToInt32(args[2]);
298 sizeMin = Convert.ToDouble(args[3]);
299 sizeRange = Convert.ToDouble(args[4]);
300 island = Convert.ToBoolean(args[5]);
301 additive = Convert.ToBoolean(args[6]);
302 noisy = Convert.ToBoolean(args[7]);
303 }
304 else
305 {
306 count = 200;
307 sizeMin = 20;
308 sizeRange = 40;
309 island = true;
310 additive = true;
311 noisy = false;
312 }
313
314 switch (args[1].ToLower())
315 {
316 case "blocks":
317 heightmap.hillsBlocks(count, sizeMin, sizeRange, island, additive, noisy);
318 break;
319 case "cones":
320 heightmap.hillsCones(count, sizeMin, sizeRange, island, additive, noisy);
321 break;
322 case "spheres":
323 heightmap.hillsSpheres(count, sizeMin, sizeRange, island, additive, noisy);
324 break;
325 case "squared":
326 heightmap.hillsSquared(count, sizeMin, sizeRange, island, additive, noisy);
327 break;
328 default:
329 resultText = "Unknown hills type";
330 return false;
331 }
332 return true;
333 }
334
249 /// <summary> 335 /// <summary>
250 /// Renormalises the array between min and max 336 /// Renormalises the array between min and max
251 /// </summary> 337 /// </summary>
diff --git a/OpenSim/OpenSim/Application.cs b/OpenSim/OpenSim/Application.cs
index 1886984..804d46a 100644
--- a/OpenSim/OpenSim/Application.cs
+++ b/OpenSim/OpenSim/Application.cs
@@ -115,7 +115,7 @@ namespace OpenSim
115 115
116 while (true) 116 while (true)
117 { 117 {
118 OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt(); 118 OpenSim.Framework.Console.MainLog.Instance.MainLogPrompt();
119 } 119 }
120 } 120 }
121 } 121 }
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs
index 762b9e1..d6fbb11 100644
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ b/OpenSim/OpenSim/OpenSimMain.cs
@@ -91,10 +91,10 @@ namespace OpenSim
91 this.SetupFromConfigFile(this.localConfig); 91 this.SetupFromConfigFile(this.localConfig);
92 } 92 }
93 93
94 m_console = new ConsoleBase(m_logFilename, "Region", this, m_silent); 94 m_log = new LogBase(m_logFilename, "Region", this, m_silent);
95 OpenSim.Framework.Console.MainConsole.Instance = m_console; 95 OpenSim.Framework.Console.MainLog.Instance = m_log;
96 96
97 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Loading configuration"); 97 m_log.Verbose( "Main.cs:Startup() - Loading configuration");
98 this.serversData.InitConfig(this.m_sandbox, this.localConfig); 98 this.serversData.InitConfig(this.m_sandbox, this.localConfig);
99 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change 99 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
100 100
@@ -122,7 +122,7 @@ namespace OpenSim
122 122
123 this.SetupWorld(); 123 this.SetupWorld();
124 124
125 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Initialising HTTP server"); 125 m_log.Verbose( "Main.cs:Startup() - Initialising HTTP server");
126 126
127 this.SetupHttpListener(); 127 this.SetupHttpListener();
128 128
@@ -140,7 +140,7 @@ namespace OpenSim
140 } 140 }
141 141
142 //Start http server 142 //Start http server
143 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting HTTP server"); 143 m_log.Verbose( "Main.cs:Startup() - Starting HTTP server");
144 httpServer.Start(); 144 httpServer.Start();
145 145
146 // Start UDP servers 146 // Start UDP servers
@@ -161,7 +161,7 @@ namespace OpenSim
161 } 161 }
162 catch (Exception e) 162 catch (Exception e)
163 { 163 {
164 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, e.Message + "\nSorry, could not setup local cache"); 164 m_log.Error( e.Message + "\nSorry, could not setup local cache");
165 Environment.Exit(1); 165 Environment.Exit(1);
166 } 166 }
167 167
@@ -176,7 +176,7 @@ namespace OpenSim
176 } 176 }
177 catch (Exception e) 177 catch (Exception e)
178 { 178 {
179 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, e.Message + "\nSorry, could not setup remote cache"); 179 m_log.Error( e.Message + "\nSorry, could not setup remote cache");
180 Environment.Exit(1); 180 Environment.Exit(1);
181 } 181 }
182 } 182 }
@@ -227,15 +227,15 @@ namespace OpenSim
227 regionDat.InitConfig(this.m_sandbox, regionConfig); 227 regionDat.InitConfig(this.m_sandbox, regionConfig);
228 regionConfig.Close(); 228 regionConfig.Close();
229 229
230 udpServer = new UDPServer(regionDat.IPListenPort, this.AssetCache, this.InventoryCache, this.m_console, authenBase); 230 udpServer = new UDPServer(regionDat.IPListenPort, this.AssetCache, this.InventoryCache, this.m_log, authenBase);
231 231
232 m_udpServer.Add(udpServer); 232 m_udpServer.Add(udpServer);
233 this.regionData.Add(regionDat); 233 this.regionData.Add(regionDat);
234 234
235 /* 235 /*
236 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); 236 m_log.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL, "Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
237 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Initialising world"); 237 m_log.Verbose( "Initialising world");
238 m_console.componentname = "Region " + regionData.RegionName; 238 m_log.componentname = "Region " + regionData.RegionName;
239 */ 239 */
240 240
241 LocalWorld = new Scene(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager, this.AssetCache); 241 LocalWorld = new Scene(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager, this.AssetCache);
@@ -248,7 +248,7 @@ namespace OpenSim
248 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. 248 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
249 LocalWorld.LoadWorldMap(); 249 LocalWorld.LoadWorldMap();
250 250
251 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting up messaging system"); 251 m_log.Verbose( "Main.cs:Startup() - Starting up messaging system");
252 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); 252 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
253 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); 253 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
254 LocalWorld.LoadPrimsFromStorage(); 254 LocalWorld.LoadPrimsFromStorage();
@@ -355,7 +355,7 @@ namespace OpenSim
355 switch (attri) 355 switch (attri)
356 { 356 {
357 default: 357 default:
358 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); 358 m_log.Warn( "Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
359 Environment.Exit(1); 359 Environment.Exit(1);
360 break; 360 break;
361 361
@@ -391,16 +391,16 @@ namespace OpenSim
391 /// </summary> 391 /// </summary>
392 public virtual void Shutdown() 392 public virtual void Shutdown()
393 { 393 {
394 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Closing all threads"); 394 m_log.Verbose( "Main.cs:Shutdown() - Closing all threads");
395 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Killing listener thread"); 395 m_log.Verbose( "Main.cs:Shutdown() - Killing listener thread");
396 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Killing clients"); 396 m_log.Verbose( "Main.cs:Shutdown() - Killing clients");
397 // IMPLEMENT THIS 397 // IMPLEMENT THIS
398 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Shutdown() - Closing console and terminating"); 398 m_log.Verbose( "Main.cs:Shutdown() - Closing console and terminating");
399 for (int i = 0; i < m_localWorld.Count; i++) 399 for (int i = 0; i < m_localWorld.Count; i++)
400 { 400 {
401 ((Scene)m_localWorld[i]).Close(); 401 ((Scene)m_localWorld[i]).Close();
402 } 402 }
403 m_console.Close(); 403 m_log.Close();
404 Environment.Exit(0); 404 Environment.Exit(0);
405 } 405 }
406 406
@@ -415,8 +415,8 @@ namespace OpenSim
415 switch (command) 415 switch (command)
416 { 416 {
417 case "help": 417 case "help":
418 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "show users - show info about connected users"); 418 m_log.Error( "show users - show info about connected users");
419 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "shutdown - disconnect all clients and shutdown"); 419 m_log.Error( "shutdown - disconnect all clients and shutdown");
420 break; 420 break;
421 421
422 case "show": 422 case "show":
@@ -430,7 +430,7 @@ namespace OpenSim
430 //string result = ""; 430 //string result = "";
431 /* if (!((World)m_localWorld).Terrain.RunTerrainCmd(cmdparams, ref result)) 431 /* if (!((World)m_localWorld).Terrain.RunTerrainCmd(cmdparams, ref result))
432 { 432 {
433 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, result); 433 m_log.Error( result);
434 }*/ 434 }*/
435 break; 435 break;
436 436
@@ -439,7 +439,7 @@ namespace OpenSim
439 break; 439 break;
440 440
441 default: 441 default:
442 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "Unknown command"); 442 m_log.Error( "Unknown command");
443 break; 443 break;
444 } 444 }
445 } 445 }
@@ -453,18 +453,18 @@ namespace OpenSim
453 switch (ShowWhat) 453 switch (ShowWhat)
454 { 454 {
455 case "uptime": 455 case "uptime":
456 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "OpenSim has been running since " + startuptime.ToString()); 456 m_log.Error( "OpenSim has been running since " + startuptime.ToString());
457 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "That is " + (DateTime.Now - startuptime).ToString()); 457 m_log.Error( "That is " + (DateTime.Now - startuptime).ToString());
458 break; 458 break;
459 case "users": 459 case "users":
460 OpenSim.Region.Scenes.Avatar TempAv; 460 OpenSim.Region.Scenes.Avatar TempAv;
461 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")); 461 m_log.Error( String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP"));
462 /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) 462 /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys)
463 { 463 {
464 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") 464 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar")
465 { 465 {
466 TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID]; 466 TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID];
467 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())); 467 m_log.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()));
468 } 468 }
469 }*/ 469 }*/
470 break; 470 break;