aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console
diff options
context:
space:
mode:
authorlbsa712007-07-20 14:16:12 +0000
committerlbsa712007-07-20 14:16:12 +0000
commit2da8a7c12818f7944ce2cc2b2cb324439e48daa2 (patch)
treed10b9917637a72c594b0ed3c3600ee870687b6b0 /OpenSim/Framework/Console
parent* Assortment of Console changes - console messages are now grouped into modul... (diff)
downloadopensim-SC-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.zip
opensim-SC-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.tar.gz
opensim-SC-2da8a7c12818f7944ce2cc2b2cb324439e48daa2.tar.bz2
opensim-SC-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/Framework/Console')
-rw-r--r--OpenSim/Framework/Console/LogBase.cs35
1 files changed, 35 insertions, 0 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 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Net; 30using System.Net;
31using System.Collections.Generic;
31 32
32namespace OpenSim.Framework.Console 33namespace 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}