aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim.Framework.Console/ConsoleBase.cs24
-rw-r--r--OpenSim.GridInterfaces/Local/LocalAssetServer.cs11
-rw-r--r--OpenSim.GridInterfaces/Local/LocalGridServer.cs3
-rw-r--r--OpenSim.Physics/Manager/PhysicsManager.cs8
-rw-r--r--OpenSim.Physics/Manager/PhysicsScene.cs9
-rw-r--r--OpenSim.Servers/BaseHttpServer.cs7
-rw-r--r--OpenSim.Servers/OpenGridProtocol.cs11
7 files changed, 39 insertions, 34 deletions
diff --git a/OpenSim.Framework.Console/ConsoleBase.cs b/OpenSim.Framework.Console/ConsoleBase.cs
index 4c92474..c72af45 100644
--- a/OpenSim.Framework.Console/ConsoleBase.cs
+++ b/OpenSim.Framework.Console/ConsoleBase.cs
@@ -3,19 +3,19 @@ using System.IO;
3 3
4namespace OpenSim.Framework.Console 4namespace OpenSim.Framework.Console
5{ 5{
6 public class ConsoleBase 6 public enum LogPriority : int
7 { 7 {
8 public enum LogPriority : int 8 CRITICAL,
9 { 9 HIGH,
10 CRITICAL, 10 MEDIUM,
11 HIGH, 11 NORMAL,
12 MEDIUM, 12 LOW,
13 NORMAL, 13 VERBOSE,
14 LOW, 14 EXTRAVERBOSE
15 VERBOSE, 15 }
16 EXTRAVERBOSE
17 }
18 16
17 public class ConsoleBase
18 {
19 StreamWriter Log; 19 StreamWriter Log;
20 public conscmd_callback cmdparser; 20 public conscmd_callback cmdparser;
21 public string componentname; 21 public string componentname;
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Console
142 } 142 }
143 else 143 else
144 { 144 {
145 this.WriteLine("Valid options are " + OptionA + " or " + OptionB); 145 this.WriteLine(LogPriority.MEDIUM,"Valid options are " + OptionA + " or " + OptionB);
146 temp = CmdPrompt(prompt, defaultresponse); 146 temp = CmdPrompt(prompt, defaultresponse);
147 } 147 }
148 } 148 }
diff --git a/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
index 9162bd3..962cd40 100644
--- a/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
+++ b/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
@@ -6,6 +6,7 @@ using System.IO;
6using OpenSim.Framework.Interfaces; 6using OpenSim.Framework.Interfaces;
7using OpenSim.Framework.Types; 7using OpenSim.Framework.Types;
8using OpenSim.Framework.Utilities; 8using OpenSim.Framework.Utilities;
9using OpenSim.Framework.Console;
9using libsecondlife; 10using libsecondlife;
10using Db4objects.Db4o; 11using Db4objects.Db4o;
11using Db4objects.Db4o.Query; 12using Db4objects.Db4o.Query;
@@ -38,16 +39,16 @@ namespace OpenSim.GridInterfaces.Local
38 this._assetRequests = new BlockingQueue<ARequest>(); 39 this._assetRequests = new BlockingQueue<ARequest>();
39 yapfile = System.IO.File.Exists("assets.yap"); 40 yapfile = System.IO.File.Exists("assets.yap");
40 41
41 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Local Asset Server class created"); 42 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"Local Asset Server class created");
42 try 43 try
43 { 44 {
44 db = Db4oFactory.OpenFile("assets.yap"); 45 db = Db4oFactory.OpenFile("assets.yap");
45 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4 Asset database creation"); 46 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"Db4 Asset database creation");
46 } 47 }
47 catch (Exception e) 48 catch (Exception e)
48 { 49 {
49 db.Close(); 50 db.Close();
50 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4 Asset server :Constructor - Exception occured"); 51 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,"Db4 Asset server :Constructor - Exception occured");
51 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString()); 52 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
52 } 53 }
53 if (!yapfile) 54 if (!yapfile)
@@ -96,7 +97,7 @@ namespace OpenSim.GridInterfaces.Local
96 { 97 {
97 if (db != null) 98 if (db != null)
98 { 99 {
99 Console.WriteLine("Closing local Asset server database"); 100 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Closing local asset server database");
100 db.Close(); 101 db.Close();
101 } 102 }
102 } 103 }
@@ -140,7 +141,7 @@ namespace OpenSim.GridInterfaces.Local
140 try 141 try
141 { 142 {
142 143
143 Console.WriteLine("setting up Asset database"); 144 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Setting up asset database");
144 145
145 AssetBase Image = new AssetBase(); 146 AssetBase Image = new AssetBase();
146 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); 147 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
diff --git a/OpenSim.GridInterfaces/Local/LocalGridServer.cs b/OpenSim.GridInterfaces/Local/LocalGridServer.cs
index e08d635..622eb53 100644
--- a/OpenSim.GridInterfaces/Local/LocalGridServer.cs
+++ b/OpenSim.GridInterfaces/Local/LocalGridServer.cs
@@ -30,6 +30,7 @@ using System.Threading;
30using System.IO; 30using System.IO;
31using OpenSim.Framework.Interfaces; 31using OpenSim.Framework.Interfaces;
32using OpenSim.Framework.Types; 32using OpenSim.Framework.Types;
33using OpenSim.Framework.Console;
33using libsecondlife; 34using libsecondlife;
34using Db4objects.Db4o; 35using Db4objects.Db4o;
35using Db4objects.Db4o.Query; 36using Db4objects.Db4o.Query;
@@ -60,7 +61,7 @@ namespace OpenSim.GridInterfaces.Local
60 public LocalGridServer() 61 public LocalGridServer()
61 { 62 {
62 Sessions = new List<Login>(); 63 Sessions = new List<Login>();
63 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Local Grid Server class created"); 64 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"Local Grid Server class created");
64 } 65 }
65 66
66 public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) 67 public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port)
diff --git a/OpenSim.Physics/Manager/PhysicsManager.cs b/OpenSim.Physics/Manager/PhysicsManager.cs
index 616682b..291fc7e 100644
--- a/OpenSim.Physics/Manager/PhysicsManager.cs
+++ b/OpenSim.Physics/Manager/PhysicsManager.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using Axiom.MathLib; 32using Axiom.MathLib;
33using OpenSim.Framework.Console;
33 34
34namespace OpenSim.Physics.Manager 35namespace OpenSim.Physics.Manager
35{ 36{
@@ -54,14 +55,13 @@ namespace OpenSim.Physics.Manager
54 55
55 if(_plugins.ContainsKey(engineName)) 56 if(_plugins.ContainsKey(engineName))
56 { 57 {
57 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("creating "+engineName); 58 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"creating "+engineName);
58 return _plugins[engineName].GetScene(); 59 return _plugins[engineName].GetScene();
59 } 60 }
60 else 61 else
61 { 62 {
62 string error = String.Format("couldn't find physicsEngine: {0}", engineName); 63 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName);
63 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(error); 64 throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName));
64 throw new ArgumentException(error);
65 } 65 }
66 } 66 }
67 67
diff --git a/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim.Physics/Manager/PhysicsScene.cs
index 0b3dfd2..b79cc46 100644
--- a/OpenSim.Physics/Manager/PhysicsScene.cs
+++ b/OpenSim.Physics/Manager/PhysicsScene.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Framework.Console;
31 32
32namespace OpenSim.Physics.Manager 33namespace OpenSim.Physics.Manager
33{ 34{
@@ -65,13 +66,13 @@ namespace OpenSim.Physics.Manager
65 66
66 public override PhysicsActor AddAvatar(PhysicsVector position) 67 public override PhysicsActor AddAvatar(PhysicsVector position)
67 { 68 {
68 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : AddAvatar({0})", position); 69 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"NullPhysicsScene : AddAvatar({0})", position);
69 return PhysicsActor.Null; 70 return PhysicsActor.Null;
70 } 71 }
71 72
72 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 73 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
73 { 74 {
74 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : AddPrim({0},{1})", position, size); 75 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : AddPrim({0},{1})", position, size);
75 return PhysicsActor.Null; 76 return PhysicsActor.Null;
76 } 77 }
77 78
@@ -84,12 +85,12 @@ namespace OpenSim.Physics.Manager
84 85
85 public override void GetResults() 86 public override void GetResults()
86 { 87 {
87 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : GetResults()"); 88 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : GetResults()");
88 } 89 }
89 90
90 public override void SetTerrain(float[] heightMap) 91 public override void SetTerrain(float[] heightMap)
91 { 92 {
92 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); 93 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
93 } 94 }
94 95
95 public override void DeleteTerrain() 96 public override void DeleteTerrain()
diff --git a/OpenSim.Servers/BaseHttpServer.cs b/OpenSim.Servers/BaseHttpServer.cs
index bb8f0ad..bd5eed4 100644
--- a/OpenSim.Servers/BaseHttpServer.cs
+++ b/OpenSim.Servers/BaseHttpServer.cs
@@ -7,6 +7,7 @@ using System.Threading;
7//using OpenSim.CAPS; 7//using OpenSim.CAPS;
8using Nwc.XmlRpc; 8using Nwc.XmlRpc;
9using System.Collections; 9using System.Collections;
10using OpenSim.Framework.Console;
10 11
11namespace OpenSim.Servers 12namespace OpenSim.Servers
12{ 13{
@@ -219,7 +220,7 @@ namespace OpenSim.Servers
219 220
220 public void Start() 221 public void Start()
221 { 222 {
222 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("BaseHttpServer.cs: Starting up HTTP Server"); 223 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"BaseHttpServer.cs: Starting up HTTP Server");
223 224
224 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 225 m_workerThread = new Thread(new ThreadStart(StartHTTP));
225 m_workerThread.IsBackground = true; 226 m_workerThread.IsBackground = true;
@@ -230,7 +231,7 @@ namespace OpenSim.Servers
230 { 231 {
231 try 232 try
232 { 233 {
233 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); 234 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
234 m_httpListener = new HttpListener(); 235 m_httpListener = new HttpListener();
235 236
236 m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 237 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
@@ -245,7 +246,7 @@ namespace OpenSim.Servers
245 } 246 }
246 catch (Exception e) 247 catch (Exception e)
247 { 248 {
248 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.Message); 249 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,e.Message);
249 } 250 }
250 } 251 }
251 } 252 }
diff --git a/OpenSim.Servers/OpenGridProtocol.cs b/OpenSim.Servers/OpenGridProtocol.cs
index 55c47b4..66ca497 100644
--- a/OpenSim.Servers/OpenGridProtocol.cs
+++ b/OpenSim.Servers/OpenGridProtocol.cs
@@ -7,6 +7,7 @@ using System.Text.RegularExpressions;
7using System.Threading; 7using System.Threading;
8using Nwc.XmlRpc; 8using Nwc.XmlRpc;
9using System.Collections; 9using System.Collections;
10using OpenSim.Framework.Console;
10 11
11namespace OpenSim.Servers 12namespace OpenSim.Servers
12{ 13{
@@ -35,8 +36,8 @@ namespace OpenSim.Servers
35 36
36 private void DoWork() 37 private void DoWork()
37 { 38 {
38 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: ClientHandler.DoWork() - Got new client"); 39 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"OpenGridProtocol.cs: ClientHandler.DoWork() - Got new client");
39 this.WriteLine("OpenSim 0.1, running OGS protocol 1.0"); 40 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.NORMAL, "OpenSim 0.1, running OGS protocol 1.0");
40 41
41 } 42 }
42 43
@@ -55,7 +56,7 @@ namespace OpenSim.Servers
55 56
56 public void Start() 57 public void Start()
57 { 58 {
58 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: Start() - Opening server socket"); 59 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"OpenGridProtocol.cs: Start() - Opening server socket");
59 60
60 m_clients = new ArrayList(); 61 m_clients = new ArrayList();
61 m_workerThread = new Thread(new ThreadStart(StartServerSocket)); 62 m_workerThread = new Thread(new ThreadStart(StartServerSocket));
@@ -67,7 +68,7 @@ namespace OpenSim.Servers
67 { 68 {
68 try 69 try
69 { 70 {
70 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: StartServerSocket() - Spawned main thread OK"); 71 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.LOW,"OpenGridProtocol.cs: StartServerSocket() - Spawned main thread OK");
71 72
72 73
73 m_IPendpoint = new IPEndPoint(IPAddress.Any, m_port); 74 m_IPendpoint = new IPEndPoint(IPAddress.Any, m_port);
@@ -87,7 +88,7 @@ namespace OpenSim.Servers
87 } 88 }
88 catch (Exception e) 89 catch (Exception e)
89 { 90 {
90 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.Message); 91 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,e.Message);
91 } 92 }
92 } 93 }
93 } 94 }