From f1e231e4ba4e06271330330e0578e6461759ba34 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 5 Jun 2007 13:00:57 +0000 Subject: * More assorted console cleaning --- OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs | 2 +- OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs | 7 ------- OpenSim/OpenSim/OpenSimMain.cs | 12 ++++++------ 3 files changed, 7 insertions(+), 14 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs index a5fb636..c405042 100644 --- a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs @@ -244,7 +244,7 @@ namespace OpenSim.GridInterfaces.Local } catch (Exception e) { - Console.WriteLine(e.Message); + MainConsole.Instance.Error(e.Message); } } diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs index c66c148..770ae45 100644 --- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs +++ b/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs @@ -20,11 +20,8 @@ namespace OpenSim.Scripting.EmbeddedJVM { case 184: short refIndex = (short) ((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]); - //Console.WriteLine("call to method : "+refIndex); if (this._mThread.currentClass._constantsPool[refIndex - 1] is ClassRecord.PoolMethodRef) { - // Console.WriteLine("which is " + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value + "." + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value); - // Console.WriteLine("of type " + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value); string typ = ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value; string typeparam = ""; string typereturn = ""; @@ -34,7 +31,6 @@ namespace OpenSim.Scripting.EmbeddedJVM secondbrak = typ.LastIndexOf(')'); typeparam = typ.Substring(firstbrak + 1, secondbrak - firstbrak - 1); typereturn = typ.Substring(secondbrak + 1, typ.Length - secondbrak - 1); - //Console.WriteLine("split is " + typeparam + " which is length " + typeparam.Length + " , " + typereturn); if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == this._mThread.currentClass.mClass.Name.Value) { //calling a method in this class @@ -72,12 +68,10 @@ namespace OpenSim.Scripting.EmbeddedJVM BaseType bs1 = this._mThread.currentFrame.OpStack.Pop(); if (bs1 is Int) { - //Console.WriteLine("get entity pos for " + ((Int)bs1).mValue); //should get the position of the entity from the IScriptAPI OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue); Float pos = new Float(); pos.mValue = vec3.X; - // Console.WriteLine("returned x value " + vec3.X.ToString()); this._mThread.currentFrame.OpStack.Push(pos); } this._mThread.PC += 2; @@ -116,7 +110,6 @@ namespace OpenSim.Scripting.EmbeddedJVM { if(in1 is Int) { - //Console.WriteLine("set: " + ((Int)in1).mValue + " , " + ((Float)ft1).mValue + " , " + ((Float)ft2).mValue + " , " + ((Float)ft3).mValue); Thread.OpenSimScriptAPI.SetEntityPosition((uint)((Int) in1).mValue, ((Float)ft1).mValue, ((Float)ft2).mValue, ((Float)ft3).mValue); } } diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs index b462aac..38ee74f 100644 --- a/OpenSim/OpenSim/OpenSimMain.cs +++ b/OpenSim/OpenSim/OpenSimMain.cs @@ -208,10 +208,10 @@ namespace OpenSim m_console.Notice("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!"); } - Console.WriteLine("Creating ParcelManager"); + m_console.Notice("Creating ParcelManager"); LocalWorld.parcelManager = new OpenSim.RegionServer.world.ParcelManager(this.LocalWorld); - Console.WriteLine("Loading Parcels from DB..."); + m_console.Notice("Loading Parcels from DB..."); LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager); m_heartbeatTimer.Enabled = true; @@ -359,7 +359,7 @@ namespace OpenSim } catch (Exception e) { - m_console.Error(e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!"); + m_console.Error("Did not recieve valid information from the grid server. " + e.ToString()); Environment.Exit(1); } } @@ -460,9 +460,9 @@ namespace OpenSim } catch (Exception e) { - Console.WriteLine(e.Message); - Console.WriteLine("\nSorry, a fatal error occurred while trying to initialise the configuration data"); - Console.WriteLine("Can not continue starting up"); + m_console.Error(e.Message); + m_console.Error("Sorry, a fatal error occurred while trying to initialise the configuration data"); + m_console.Error("Can not continue starting up"); Environment.Exit(1); } } -- cgit v1.1