aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.RegionServer/OpenSimMain.cs')
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs68
1 files changed, 34 insertions, 34 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index 8d89c6a..d522e2b 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -122,7 +122,7 @@ namespace OpenSim
122 { 122 {
123 this.SetupFromConfigFile(this.localConfig); 123 this.SetupFromConfigFile(this.localConfig);
124 } 124 }
125 m_console.WriteLine("Main.cs:Startup() - Loading configuration"); 125 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
126 this.regionData.InitConfig(this.m_sandbox, this.localConfig); 126 this.regionData.InitConfig(this.m_sandbox, this.localConfig);
127 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change 127 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
128 128
@@ -133,7 +133,7 @@ namespace OpenSim
133 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; 133 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
134 GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; 134 GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll";
135 135
136 m_console.WriteLine("Starting in Sandbox mode"); 136 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Starting in Sandbox mode");
137 } 137 }
138 else 138 else
139 { 139 {
@@ -147,7 +147,7 @@ namespace OpenSim
147 } 147 }
148 GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; 148 GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll";
149 149
150 m_console.WriteLine("Starting in Grid mode"); 150 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Starting in Grid mode");
151 } 151 }
152 152
153 try 153 try
@@ -156,7 +156,7 @@ namespace OpenSim
156 } 156 }
157 catch (Exception e) 157 catch (Exception e)
158 { 158 {
159 m_console.WriteLine(e.Message + "\nSorry, could not setup the grid interface"); 159 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,e.Message + "\nSorry, could not setup the grid interface");
160 Environment.Exit(1); 160 Environment.Exit(1);
161 } 161 }
162 162
@@ -169,7 +169,7 @@ namespace OpenSim
169 } 169 }
170 catch (Exception e) 170 catch (Exception e)
171 { 171 {
172 m_console.WriteLine(e.Message + "\nSorry, could not setup local cache"); 172 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,e.Message + "\nSorry, could not setup local cache");
173 Environment.Exit(1); 173 Environment.Exit(1);
174 } 174 }
175 175
@@ -185,11 +185,11 @@ namespace OpenSim
185 { 185 {
186 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort)) 186 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort))
187 { 187 {
188 m_console.WriteLine("Main.cs:Startup() - Success: Got a grid connection OK!"); 188 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Success: Got a grid connection OK!");
189 } 189 }
190 else 190 else
191 { 191 {
192 m_console.WriteLine("Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down."); 192 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down.");
193 Shutdown(); 193 Shutdown();
194 } 194 }
195 195
@@ -215,7 +215,7 @@ namespace OpenSim
215 } 215 }
216 catch (Exception e) 216 catch (Exception e)
217 { 217 {
218 m_console.WriteLine(e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!"); 218 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!");
219 Environment.Exit(1); 219 Environment.Exit(1);
220 } 220 }
221 } 221 }
@@ -223,8 +223,8 @@ namespace OpenSim
223 } 223 }
224 224
225 225
226 m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); 226 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
227 m_console.WriteLine("Initialising world"); 227 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Initialising world");
228 LocalWorld = new World(this._packetServer.ClientThreads, regionData.RegionHandle, regionData.RegionName); 228 LocalWorld = new World(this._packetServer.ClientThreads, regionData.RegionHandle, regionData.RegionName);
229 LocalWorld.InventoryCache = InventoryCache; 229 LocalWorld.InventoryCache = InventoryCache;
230 LocalWorld.AssetCache = AssetCache; 230 LocalWorld.AssetCache = AssetCache;
@@ -240,7 +240,7 @@ namespace OpenSim
240 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. 240 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
241 LocalWorld.LoadWorldMap(); 241 LocalWorld.LoadWorldMap();
242 242
243 m_console.WriteLine("Main.cs:Startup() - Starting up messaging system"); 243 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting up messaging system");
244 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use 244 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use
245 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); 245 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
246 246
@@ -252,7 +252,7 @@ namespace OpenSim
252 AssetCache.LoadDefaultTextureSet(); 252 AssetCache.LoadDefaultTextureSet();
253 } 253 }
254 254
255 m_console.WriteLine("Main.cs:Startup() - Initialising HTTP server"); 255 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Initialising HTTP server");
256 // HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort); 256 // HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort);
257 257
258 BaseHttpServer httpServer = new BaseHttpServer(regionData.IPListenPort); 258 BaseHttpServer httpServer = new BaseHttpServer(regionData.IPListenPort);
@@ -351,12 +351,12 @@ namespace OpenSim
351 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); 351 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
352 adminWebFront.LoadMethods(httpServer); 352 adminWebFront.LoadMethods(httpServer);
353 353
354 m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); 354 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP server");
355 httpServer.Start(); 355 httpServer.Start();
356 356
357 if (gridServer.GetName() == "Remote") 357 if (gridServer.GetName() == "Remote")
358 { 358 {
359 m_console.WriteLine("Main.cs:Startup() - Starting up OGS protocol server"); 359 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting up OGS protocol server");
360 OGSServer.Start(); 360 OGSServer.Start();
361 } 361 }
362 362
@@ -429,7 +429,7 @@ namespace OpenSim
429 switch (attri) 429 switch (attri)
430 { 430 {
431 default: 431 default:
432 m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); 432 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
433 Environment.Exit(1); 433 Environment.Exit(1);
434 break; 434 break;
435 435
@@ -498,8 +498,8 @@ namespace OpenSim
498 } 498 }
499 catch (Exception e) 499 catch (Exception e)
500 { 500 {
501 m_console.WriteLine(e.Message + "\nSorry, a fatal error occurred while trying to load the config DLL"); 501 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,e.Message + "\nSorry, a fatal error occurred while trying to load the config DLL");
502 m_console.WriteLine("Can not continue starting up"); 502 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"Can not continue starting up");
503 Environment.Exit(1); 503 Environment.Exit(1);
504 return null; 504 return null;
505 } 505 }
@@ -551,7 +551,7 @@ namespace OpenSim
551 XmlRpcResponse GridResp; 551 XmlRpcResponse GridResp;
552 foreach (Hashtable neighbour in ((RemoteGridBase)this.GridServers.GridServer).neighbours) 552 foreach (Hashtable neighbour in ((RemoteGridBase)this.GridServers.GridServer).neighbours)
553 { 553 {
554 m_console.WriteLine("http://" + neighbour["sim_ip"] + ":" + neighbour["sim_port"]); 554 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE,"http://" + neighbour["sim_ip"] + ":" + neighbour["sim_port"]);
555 SimParams = new Hashtable(); 555 SimParams = new Hashtable();
556 SimParams["session_id"] = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].SessionID.ToString(); 556 SimParams["session_id"] = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].SessionID.ToString();
557 SimParams["secure_session_id"] = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].SecureSessionID.ToString(); 557 SimParams["secure_session_id"] = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].SecureSessionID.ToString();
@@ -591,21 +591,21 @@ namespace OpenSim
591 591
592 private void MainServerListener() 592 private void MainServerListener()
593 { 593 {
594 m_console.WriteLine("Main.cs:MainServerListener() - New thread started"); 594 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - New thread started");
595 m_console.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + regionData.IPListenAddr + ":" + regionData.IPListenPort); 595 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - Opening UDP socket on " + regionData.IPListenAddr + ":" + regionData.IPListenPort);
596 596
597 ServerIncoming = new IPEndPoint(IPAddress.Any, regionData.IPListenPort); 597 ServerIncoming = new IPEndPoint(IPAddress.Any, regionData.IPListenPort);
598 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 598 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
599 Server.Bind(ServerIncoming); 599 Server.Bind(ServerIncoming);
600 600
601 m_console.WriteLine("Main.cs:MainServerListener() - UDP socket bound, getting ready to listen"); 601 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - UDP socket bound, getting ready to listen");
602 602
603 ipeSender = new IPEndPoint(IPAddress.Any, 0); 603 ipeSender = new IPEndPoint(IPAddress.Any, 0);
604 epSender = (EndPoint)ipeSender; 604 epSender = (EndPoint)ipeSender;
605 ReceivedData = new AsyncCallback(this.OnReceivedData); 605 ReceivedData = new AsyncCallback(this.OnReceivedData);
606 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 606 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
607 607
608 m_console.WriteLine("Main.cs:MainServerListener() - Listening..."); 608 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:MainServerListener() - Listening...");
609 609
610 } 610 }
611 611
@@ -650,11 +650,11 @@ namespace OpenSim
650 /// </summary> 650 /// </summary>
651 public virtual void Shutdown() 651 public virtual void Shutdown()
652 { 652 {
653 m_console.WriteLine("Main.cs:Shutdown() - Closing all threads"); 653 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Closing all threads");
654 m_console.WriteLine("Main.cs:Shutdown() - Killing listener thread"); 654 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Killing listener thread");
655 m_console.WriteLine("Main.cs:Shutdown() - Killing clients"); 655 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Killing clients");
656 // IMPLEMENT THIS 656 // IMPLEMENT THIS
657 m_console.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); 657 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Shutdown() - Closing console and terminating");
658 LocalWorld.Close(); 658 LocalWorld.Close();
659 GridServers.Close(); 659 GridServers.Close();
660 m_console.Close(); 660 m_console.Close();
@@ -681,8 +681,8 @@ namespace OpenSim
681 switch (command) 681 switch (command)
682 { 682 {
683 case "help": 683 case "help":
684 m_console.WriteLine("show users - show info about connected users"); 684 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"show users - show info about connected users");
685 m_console.WriteLine("shutdown - disconnect all clients and shutdown"); 685 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - disconnect all clients and shutdown");
686 break; 686 break;
687 687
688 case "show": 688 case "show":
@@ -693,7 +693,7 @@ namespace OpenSim
693 string result = ""; 693 string result = "";
694 if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result)) 694 if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result))
695 { 695 {
696 m_console.WriteLine(result); 696 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,result);
697 } 697 }
698 break; 698 break;
699 699
@@ -702,7 +702,7 @@ namespace OpenSim
702 break; 702 break;
703 703
704 default: 704 default:
705 m_console.WriteLine("Unknown command"); 705 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Unknown command");
706 break; 706 break;
707 } 707 }
708 } 708 }
@@ -716,18 +716,18 @@ namespace OpenSim
716 switch (ShowWhat) 716 switch (ShowWhat)
717 { 717 {
718 case "uptime": 718 case "uptime":
719 m_console.WriteLine("OpenSim has been running since " + startuptime.ToString()); 719 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"OpenSim has been running since " + startuptime.ToString());
720 m_console.WriteLine("That is " + (DateTime.Now - startuptime).ToString()); 720 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"That is " + (DateTime.Now - startuptime).ToString());
721 break; 721 break;
722 case "users": 722 case "users":
723 OpenSim.world.Avatar TempAv; 723 OpenSim.world.Avatar TempAv;
724 m_console.WriteLine(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); 724 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"));
725 foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) 725 foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys)
726 { 726 {
727 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") 727 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar")
728 { 728 {
729 TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID]; 729 TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID];
730 m_console.WriteLine(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString())); 730 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()));
731 } 731 }
732 } 732 }
733 break; 733 break;