diff options
author | lbsa71 | 2007-07-20 14:16:12 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-20 14:16:12 +0000 |
commit | 2da8a7c12818f7944ce2cc2b2cb324439e48daa2 (patch) | |
tree | d10b9917637a72c594b0ed3c3600ee870687b6b0 /OpenSim | |
parent | * Assortment of Console changes - console messages are now grouped into modul... (diff) | |
download | opensim-SC_OLD-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.zip opensim-SC_OLD-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.tar.gz opensim-SC_OLD-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.tar.bz2 opensim-SC_OLD-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.tar.xz |
* Fixed an config issue (log not initialized in RegionInfo config)
* Added LineInfo stacktrace parser to LogBase (not used yet though)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Console/LogBase.cs | 35 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/NetworkServersInfo.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Program.cs | 5 |
5 files changed, 47 insertions, 2 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index 7d38c3a..60c77fe 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Collections.Generic; | ||
31 | 32 | ||
32 | namespace OpenSim.Framework.Console | 33 | namespace OpenSim.Framework.Console |
33 | { | 34 | { |
@@ -417,5 +418,39 @@ namespace OpenSim.Framework.Console | |||
417 | string[] cmdparams = (string[])tempstrarray; | 418 | string[] cmdparams = (string[])tempstrarray; |
418 | RunCmd(cmd, cmdparams); | 419 | RunCmd(cmd, cmdparams); |
419 | } | 420 | } |
421 | |||
422 | public string LineInfo | ||
423 | { | ||
424 | get | ||
425 | { | ||
426 | string result = String.Empty; | ||
427 | |||
428 | string stacktrace = Environment.StackTrace; | ||
429 | List<string> lines = new List<string>(stacktrace.Split(new string[] { "at " }, StringSplitOptions.None)); | ||
430 | |||
431 | if (lines.Count > 4) | ||
432 | { | ||
433 | lines.RemoveRange(0, 4); | ||
434 | |||
435 | string tmpLine = lines[0]; | ||
436 | |||
437 | int inIndex = tmpLine.IndexOf(" in "); | ||
438 | |||
439 | if (inIndex > -1) | ||
440 | { | ||
441 | result = tmpLine.Substring(0, inIndex); | ||
442 | |||
443 | int lineIndex = tmpLine.IndexOf(":line "); | ||
444 | |||
445 | if (lineIndex > -1) | ||
446 | { | ||
447 | lineIndex += 6; | ||
448 | result += ", line " + tmpLine.Substring(lineIndex, (tmpLine.Length - lineIndex) - 5); | ||
449 | } | ||
450 | } | ||
451 | } | ||
452 | return result; | ||
453 | } | ||
454 | } | ||
420 | } | 455 | } |
421 | } | 456 | } |
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs index 7f21d45..c40746b 100644 --- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs +++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs | |||
@@ -59,6 +59,11 @@ namespace OpenSim.Framework.Types | |||
59 | configMember.performConfigurationRetrieve(); | 59 | configMember.performConfigurationRetrieve(); |
60 | } | 60 | } |
61 | 61 | ||
62 | public NetworkServersInfo( ) | ||
63 | { | ||
64 | |||
65 | } | ||
66 | |||
62 | public void loadConfigurationOptions() | 67 | public void loadConfigurationOptions() |
63 | { | 68 | { |
64 | 69 | ||
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 3c11b90..6b7026c 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -151,6 +151,7 @@ namespace OpenSim | |||
151 | 151 | ||
152 | protected override void Initialize() | 152 | protected override void Initialize() |
153 | { | 153 | { |
154 | m_networkServersInfo = new NetworkServersInfo("NETWORK SERVERS INFO", "network_servers_information.xml"); | ||
154 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | 155 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; |
155 | m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); | 156 | m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); |
156 | } | 157 | } |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 8de9bde..4a1fd99 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -67,10 +67,9 @@ namespace OpenSim.Region.ClientStack | |||
67 | { | 67 | { |
68 | 68 | ||
69 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 69 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
70 | m_networkServersInfo = new NetworkServersInfo("NETWORK SERVERS INFO", "network_servers_information.xml"); | ||
71 | 70 | ||
72 | Initialize(); | 71 | Initialize(); |
73 | 72 | ||
74 | ScenePresence.LoadTextureFile("avatar-texture.dat"); | 73 | ScenePresence.LoadTextureFile("avatar-texture.dat"); |
75 | 74 | ||
76 | m_httpServer = new BaseHttpServer( m_httpServerPort ); | 75 | m_httpServer = new BaseHttpServer( m_httpServerPort ); |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 82dba0e..5c16d6b 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -34,6 +34,9 @@ namespace SimpleApp | |||
34 | 34 | ||
35 | StartLog(); | 35 | StartLog(); |
36 | 36 | ||
37 | m_networkServersInfo = new NetworkServersInfo( ); | ||
38 | |||
39 | |||
37 | LocalAssetServer assetServer = new LocalAssetServer(); | 40 | LocalAssetServer assetServer = new LocalAssetServer(); |
38 | assetServer.SetServerInfo("http://localhost:8003/", ""); | 41 | assetServer.SetServerInfo("http://localhost:8003/", ""); |
39 | 42 | ||
@@ -46,6 +49,8 @@ namespace SimpleApp | |||
46 | 49 | ||
47 | m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer); | 50 | m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer); |
48 | 51 | ||
52 | m_log.Notice(m_log.LineInfo); | ||
53 | |||
49 | ScenePresence.PhysicsEngineFlying = true; | 54 | ScenePresence.PhysicsEngineFlying = true; |
50 | 55 | ||
51 | IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); | 56 | IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); |